##### 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

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.