929 views
1 1 vote
Given a system with 3 processes where each process requires at least 2 resources to complete their execution, then the largest number of resources which will guarantee a deadlock is ___

1 Answer

Best answer
3 3 votes
Here they are asking for a guaranteed deadlock, and we can only guarantee a deadlock when we have fewer resources than the max requirement by any candidate.

Lets label these 3 processes, $p_1,p_2,p_3$,

$R_{max-guaranteed-deadlock} = max(R_1, R_2,R_3) -1$; where $R_i$ is the requirement of $i^{th}$ process.

$\implies R_{max-guaranteed-deadlock} =2 -1 = \mathbf{1} $.

Note that the maximum value for which we may have a deadlock is different from the max value to guarantee a deadlock.

Max possible value for which we may have deadlock = $\displaystyle  \sum_{i=1}^{3}(R_i -1) = 3$

The minimum value to guarantee no deadlock= Max possible value for which we may have deadlock + 1 = 3+1 = 4.

Word guarantee changes everything.
• selected by
Answer:
Position:
Show:

Related questions

1 1 vote
1 1 answer
837
837 views
ramakrushna asked Dec 20, 2021
837 views
Given a system with 3 processes where each process requires at least 2 resources to complete their execution, then the largest number of resources which will guarantee a ...
2 2 votes
1 answers 1 answer
1.1k
1.1k views
LRU asked Oct 21, 2021
1,067 views
In a system which has only 3 processes, there are 2 copies of R1 resource, 3 copies of R2 resource. Say, in the current snapshot of the system, Process P1 holds 2 copies ...
5 5 votes
2 answers 2 answers
1.1k
1.1k views
LRU asked Oct 10, 2021
1,067 views
A given system has 13 processes and x number of copies of a resource r. Out of 13 processes, 6 processes require 2 resources each, 3 processes require 3 resources each a...
2 2 votes
2 answers 2 answers
1.5k
1.5k views
LRU asked Oct 10, 2021
1,489 views
Given 5 processes and R copies of total resources in a system, each process requires 7 copies of resources to complete its execution. The maximum value of R to have deadl...