retagged by
242 views
3 votes
3 votes

Which of the following is a TRUE statement?

 


                            $fig (a)$                                                                        $fig (b)$


 

  1.      Deadlock occurs in both the cases.
  2.      Deadlock occurs in $fig (b)$, but not in  $fig (a)$.
  3.      Deadlock occurs in $fig (a)$, but not in $fig (b)$.
  4.      Deadlock does not occur in either case.
retagged by

1 Answer

Best answer
2 votes
2 votes
in figure (a) process P1  requesting R1 and holding R2, process P2  requesting R3 and holding R2 , process P3  requesting R2 and holding R3.
so all P1, P2 , P3  are in Deadlock .

In figure (b) process P1  requesting R1 and holding R2, process P2  holding R1, process P3 requesting R2 and holding R1, and process P4  holding R2, so P4 can release R2 which can later obtain by P3.
P2  can release R1 which can later obtain by P1.
so they are not in Deadlock.

Hence answer is C, Deadlock occurs in fig (a), but not in fig (b).
edited by
Answer:

Related questions