CS FundamentalsModerateAccenture · Capgemini pattern
A resource-allocation graph contains a cycle. Which conclusion is correct?
- A. If every resource type in the cycle has exactly one instance, there is a deadlock; otherwise there may or may not be one
- B. The system is deadlocked only if every process is in the cycle
- C. There is never a deadlock unless the graph also has a self-loop
- 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
- Reference string (times 1 to 14): 3, 5, 3, 1, 4, 4, 2, 1, 1, 6, 6, 6, 2, 5. With working-set window Δ = 4 references, what is the working…
- Processes: A (arrival 0, burst 5), B (arrival 1, burst 3), C (arrival 2, burst 8), D (arrival 3, burst 6). Priorities: A = 3, B = 1, C =…
- Cylinders 0–199, head at 72 moving towards higher cylinders. Requests: 110, 25, 160, 47, 130, 8, 95, 185. Under C-LOOK, counting the jump…
- In the first readers–writers problem (readers get priority: a reader never waits if the resource is already being read), which problem can…
- When is a spinlock (busy-waiting lock) preferable to a blocking lock?
- Modern fork() implementations use copy-on-write. Which statement is correct?