CS FundamentalsModerateAccenture · Capgemini pattern

A resource-allocation graph contains a cycle. Which conclusion is correct?

  1. A. If every resource type in the cycle has exactly one instance, there is a deadlock; otherwise there may or may not be one
  2. B. The system is deadlocked only if every process is in the cycle
  3. C. There is never a deadlock unless the graph also has a self-loop
  4. D. The system is always deadlocked

Correct answer: A. If every resource type in the cycle has exactly one instance, there is a deadlock; otherwise there may or may not be one

With single-instance resources a cycle is necessary and sufficient for deadlock. With multiple instances a cycle is only necessary: another instance may be freed by a process outside the cycle.

More Operating Systems questions

Exams that ask this topic