CS FundamentalsModerateGATE CS

k processes each need at most 3 instances of a resource that has 7 instances in total. Requests are made one instance at a time. What is the largest k for which the system is guaranteed deadlock-free?

  1. A. 3
  2. B. 2
  3. C. 4
  4. D. 7

Correct answer: A. 3

Condition: k(3 − 1) + 1 ≤ 7, so 2k ≤ 6 and k ≤ 3. For k = 4 the processes could hold 2, 2, 2, 1 and all wait.

More Operating Systems questions

Exams that ask this topic