CS FundamentalsHardGATE CS

Three processes share one resource type with identical instances. P1 may need at most 3 instances, P2 at most 4 and P3 at most 5, and each requests instances one at a time. What is the minimum number of instances that guarantees deadlock can never occur?

  1. A. 9
  2. B. 5
  3. C. 10
  4. D. 15

Correct answer: C. 10

Worst case: each process holds one less than its maximum, 2 + 3 + 4 = 9 instances, and all wait. One more instance lets some process finish and release, so 10 suffices. 9 is exactly the deadlock state, 5 is the largest single maximum, and 15 adds a spare per process to the 12 maxima.

More Operating Systems questions

Exams that ask this topic