CS FundamentalsModerateGATE CS

In a resource-allocation graph where EVERY resource type has exactly one instance, which statement is correct?

  1. A. A cycle is necessary but not sufficient for deadlock
  2. B. A cycle is both necessary and sufficient for deadlock
  3. C. A cycle is sufficient but not necessary for deadlock
  4. D. Deadlock can occur even if the graph has no cycle

Correct answer: B. A cycle is both necessary and sufficient for deadlock

With single-instance resources, a cycle means every process in it waits for a resource held by the next, so deadlock exists; and any deadlock creates a cycle. With multiple instances a cycle is necessary but not sufficient.

More Operating Systems questions

Exams that ask this topic