GATE | GATE-CS-2000 | Question 49

Let m[0]…m[4] be mutexes (binary semaphores) and P[0] …. P[4] be processes.
Suppose each process P[i] executes the following:

  wait (m[i]); wait(m[(i+1) mode 4]);

  ------

  release (m[i]); release (m[(i+1)mod 4]); 

This could cause:
(A) Thrashing
(B) Deadlock
(C) Starvation, but not deadlock
(D) None of the above


Answer: (B)

Explanation: See question 2 of http://www.geeksforgeeks.org/operating-systems-set-1/

Quiz of this Question

GATE CS Corner    Company Wise Coding Practice

Recommended Posts:



0 Average Difficulty : 0/5.0
No votes yet.










Writing code in comment? Please use ide.geeksforgeeks.org, generate link and share the link here.