edited by
34,403 views
49 votes
49 votes

A system has $6$ identical resources and $N$ processes competing for them. Each process can request at most $2$ requests. Which one of the following values of $N$ could lead to a deadlock?

  1. $1$
  2. $2$
  3. $3$
  4. $4$
edited by

10 Answers

2 votes
2 votes
supos there are n process p1,p2,p3....pn share m identical resource which can be release/allocate one at the time.

the max resource required for process pi is si, where si>0

the sufficient condition for ensuring that DL doesn't occure:  Σsi(for i=1 to n) < (m+n)

where m= number of resource

      n= number of process

      si= total req(request resource for ith process)
2 votes
2 votes

Whenever this type of question came, related to resource and deadlock or process and deadlock the simple way to solve is

Allocate each process a resource equal to their maximum need - 1, This type of allocation gives you maximum no resources that lead to deadlock but if you just add 1 to this number you will get minimum no of resources causing no deadlock.

for example 

let us say the total no of resources is R and we have to N process and each can take almost M resource the what is the value of N? 

N * (M-1) + 1 <= R 

for this question, the maximum no of processes is 5 without deadlock, the minimum no of the process causing deadlock is 6 but it is not given in option so go with 4

0 votes
0 votes
Option D will be right option for it.

Suppose we have three process namely P1,P2 and P3

P1=2unit

P2=2Unit

P3=2unit

but here u will get no deadlock will be happen here.But if we will add one more process like below

P1=1unit

P2=1Unit

P3=1unit

P4=1Unit

it will be lead to deadlock always.
0 votes
0 votes
I believe given options are wrong because..

a) 1 Process , 6 Resources No Deadlock.

b) 2 Process , 6 Resources No Deadlock.

C) 3 Process , 6 Resources No Deadlock.         Every process can take 2 resources

D. 4 Process , 6 Resources No Deadlock.  Assign each process one resource still 2R will remaining causing no DL.

The Number of process that would lead to DL would 6. Minimum of Process that would cause no dead lock would be 5.

Please correct me If I am wrong.!
Answer:

Related questions