CS FundamentalsVery hardGATE CS (PYQ pattern)

A single resource has 9 units and three processes have maximum claims 6, 5 and 4. Consider every possible current allocation (a0, a1, a2) with 0 <= ai <= maxi and a0 + a1 + a2 <= 9. How many of these allocations are SAFE states?

  1. A. 155
  2. B. 142
  3. C. 152
  4. D. 130

Correct answer: B. 142

Enumerate all 155 feasible allocations and run the safety test (a process can finish if its remaining need fits in the available units); 142 are safe.

More Operating Systems questions

Exams that ask this topic