edited by
460 views
5 votes
5 votes

Consider a system having $k$ resources of the same type. These resources are shared by $5$ processes $A,B,C,D$, and $E$ which have peak demands of $5,7,9,3$ and $8$ respectively. Further it is restricted that at any point of time processes $A$ and $B$ together cannot hold more than $8$ resources whereas no such restrictions are there for processes $C,D$ and $E.$ For which of the following values of $k,$ deadlock may occur? (Mark all the appropriate choices)

  1. $24$
  2. $25$
  3. $27$
  4. $26$
edited by

1 Answer

Best answer
6 votes
6 votes
In the worst case for process completion, it should be that each process must hold one less resource than its peak demand. That is processes $A,B,C,D$ and $E$ must be holding $4,6,8,2$ and $7$ number of resources and if no more free resource is there, we have a deadlock. i.e., if the total number of resources is less than or equal to $4+6+8+2+7 = 27$ we can have a deadlock. But there is a further restriction that processes $A$ and $B$ together can hold maximum $8$ resources at a time. This means instead of $4+6$ we added we must do just $8.$ This means, only if the total number of resources is less than or equal to $27 - 10+8 = 25,$ there can be a deadlock.
selected by
Answer:

Related questions