CS FundamentalsHardGATE CS

A system has R identical instances of a resource shared by 4 processes needing at most 3, 4, 5 and 2 instances respectively. What is the minimum R that guarantees no deadlock, whatever the request order?

  1. A. 14
  2. B. 10
  3. C. 11
  4. D. 15

Correct answer: C. 11

Worst case: every process holds one less than its maximum, (3−1)+(4−1)+(5−1)+(2−1) = 10 instances, and none can finish. One more instance (R = 11) lets some process complete. 14 is the sum of maxima, which is more than needed.

More Operating Systems questions

Exams that ask this topic