closed by
1,462 views
0 votes
0 votes
closed with the note: got the answer

A system has 28 instances of resource P such that 4+n processes share them, 4 process request 5 instances of P. If n processes request 5 instances of same resource what is maximum value of n such that the system is in safe state.(ans=2).pls explain.

closed by

1 Answer

Best answer
3 votes
3 votes
in this question 4 process wants 5 instances each,

so for avoiding deadlock, we have provide minimum 4 instances each and 1 shared instance,i.e

p1  p2  p3  p4      and    1 shared

4     4    4    4    

so total alloted instance is   4+4+4+4+1=17

then remainning instance are 28-17=11

so,  we have to check for n process and instance provide to them 5

if value of n=2

then minimum -> 4+4+1=9

if n=3

then 4+4+4+1=13

13 is minimum required but we have only 11

so ans is n=2
selected by

Related questions

2 votes
2 votes
1 answer
2
S Ram asked Feb 2, 2017
459 views
i m calculating again n again but getting same ans.. what m i missing here pls varify once...