- GATE CS
- 2026–27 pattern practice
- Operating Systems
- Deadlocks
- Medium
Three processes each need at most 2 units of a resource. What is the minimum number of units that guarantees no deadlock?
Process Management
Pick an option to check your answer.
Answer: A. Solution
Worst case: each process holds one unit less than its maximum ( units) and waits. One extra unit lets one process finish and release its units. Minimum .
Why not the others
- 3 allows the deadlock in which each process holds 1 unit.
- 6 is sufficient but not the minimum.
- 5 is also sufficient but not minimal.