Anonymous user menu

Consider a system having m resources of the same type.These

Consider a system having m resources of the same type.These resources are shared by 3 processes A,B and C,which have peak demands of 3,4 and 6 respectively. For what value of m deadlock will not occur ?

      A. 7

      B. 9

      C. 10

      D. 13

      E. 15

Answer

Ans : D and E.     

Consider the peak demand situation of resources (A,B,C)=(3,4,6).

For a specific number of resources,to conclude there is possibility of deadlock (not deadlock free), we have to find at least one  resource allocation which results in deadlock, that is an allocation that cannot completly satisy the resource requirements of  even one process .

 

With number of shared resources m = 7, the following resource allocation (for example)among 3 process A,B,C (2,3,2).Process A holding 2 resources and waitning for 1, Process B holding 3 resource and waiting for 1 and process C holding 2 resources and waiting for 4 more resources. This is a deadlock situation.

With number of shared resources m = 9, the following resource allocation (for example)among 3 process A,B,C (2,3,4).Process A holding 2 resources and waitning for 1, Process B holding 3 resource and waiting for 1 and process C holding 4 resources and waiting for 2 more resources. This is a deadlock situation.

With number of shared resources m = 10, the following resource allocation (for example)among 3 process A,B,C (2,3,5).Process A holding 2 resources and waitning for 1, Process B holding 3 resource and waiting for 1 and process C holding 5 resources and waiting for 1 more resource. This is a deadlock situation. 

 

But for m >=11  , the resource allocation  is deadlock free.

2Comments
Parimal Andhalkar @parimal_andhalkar
15 Nov 2014 10:42 pm
utpal podder @up15
30 Sep 2015 08:27 am

Ans:D and E

 If there is n processes and there is  m  resources of the same type then the system is deadlock free if the sum of all maximum needs is less than (m+n).