in Operating System edited by
5,167 views
2 votes
2 votes

Consider a scenario where 3 processes P1, P2 and P3 are sharing  x resources of the same type. The maximum need of the three processes is 4, 8, 6. It is also known that the maximum combined need of both processes P1 and P2 at a time is 9 and they always execute only in combined manner. Then the value of  x is ___

in Operating System edited by
by
5.2k views

4 Comments

You mean make pairs for P1 and P2 ? i don't get it..how 8 is the max. requirement at any time.. the pairs show that 9 is the max need...

0
0
ans is 21
1
1
(9-1)+(6-1)+1=14(=x). x+7=14+7=21
2
2

1 Answer

0 votes
0 votes

P1 and P2 both need 9 units of resource at the same time and P3 needs 6 resource, so the minimum value of x to avoid deadlock is-->

x= (9-1) + 6 = 14   Why?--> see this https://gateoverflow.in/19379/what-logic-calculating-minimum-resources-remove-deadlock

now x+7 =21

ANS= 21

by

Related questions