OS MOCK
closed

closed by
776 views
1 votes
1 votes
closed with the note: Duplicate

closed by

1 Answer

0 votes
0 votes

P1 needs 4 resources , P2 -- > 6 and P3 --->8 resources

NOW IMPORTANT STATEMENT HERE-----MAX. REQUIREMENT FOR COMBINATION P1 AND P3 IS 9

by this statement they means that max 9, it can also be less.  it satisfies condition means X + Y <= 9.

now there is a difference b/w individual demand of resources and combined resource demand once you are combining P1 and P3 and evaluating according to their combined demand there is no need to take care of their individual demand of resource .As combined resource demand is different from individual one .

my whole meaning to say above statements is that  from max requirement is 9 line concludes that------

we can allocate resources either p1 or p3 and now our dependency of p1 and p2 both less than or equal to 9 . 

now see peak demands p1 ---> 4 and p3 -----> 8 . so we allocate 7  resources to p3 as it is asking maximum value for which deadlock not occurs  and we add p2 resources max requiremnet and then

so 7 ( p3 ) + 5 (p2) + 1 = 13 .

so we need 13 resources

 

No related questions found