P1 has statements
P2 has statements
wait(S) ; wait(Q) ;
wait(Q) ; wait(S) ;
critical- section 1; critical- section
2;
signal(S) ; signal(Q) ;
signal(Q) ; signal(S) ;
Their execution may sometimes lead
to an undesirable situation called
(A) Starvation
(B) Race condition
(C) Multithreading
(D) Deadlock
Answer D.
Explanation.
Suppose s is critical section of P1 and
Q is in the critical section of p2.
Process p1 wants resources Q held by P2.
Process p2 wants resources S held by p1.
P1 and p2 both needs resources and are not relinquishing the resources.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.