CS FundamentalsModerateGATE CS

n processes share 12 identical units of a resource, and each process may need up to 4 units. What is the largest n for which deadlock is impossible?

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

Correct answer: D. 3

Deadlock is impossible if n(4 − 1) + 1 ≤ 12, i.e. 3n ≤ 11, n ≤ 3. With n = 4 each could hold 3 units (all 12) and wait forever.

More Operating Systems questions

Exams that ask this topic