The GATE Grind

GATE 2017 CS (CS2) – Question 43

Operating System · Deadlock · 2 marks · Multiple choice

Nine tape drives are shared. For P₁,P₂,P₃, current allocations are 3,1,3 and maximum requirements are 7,6,5. Describe the system state.

  1. Safe, deadlocked
  2. Safe, not deadlocked
  3. Not safe, deadlocked
  4. Not safe, not deadlocked

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (B) Safe, not deadlocked

Explanation

Available drives are 9−(3+1+3)=2. Remaining needs are 4,5,2. Finish P₃ first and release its three allocated drives, leaving five available. Then P₁ can finish, followed by P₂. A safe sequence P₃,P₁,P₂ exists, so the system is safe and not deadlocked, B.

More Deadlock questions

All Deadlock questions →