Definition
Deadlock Prevention
Deadlock prevention is an approach to managing deadlocks by ensuring at least one of the four Coffman conditions can never hold.
Strategies are divided into two categories:
- Indirect: Invalidates static system properties (Mutual Exclusion, Hold and Wait, No Preemption)
- Direct: Prevents formation of circular wait
Techniques
| Condition | Prevention Method |
|---|---|
| Mutual Exclusion | Use spooling for non-shareable resources |
| Hold and Wait | Request all resources simultaneously |
| No Preemption | Allow OS to reclaim resources from blocked processes |
| Circular Wait | Enforce strict linear ordering of resource types |