Definition
Direct Deadlock Prevention
Direct deadlock prevention prevents deadlocks by explicitly prohibiting the circular wait condition.
The most common method uses a strict linear ordering of all resource types. A process may only request resource if for all resources it currently holds.
Correctness
This hierarchy ensures no dependency cycle can form. See Circular Wait Prevention for the proof.
Properties
Lower Concurrency
Legitimate out-of-order requests are denied, potentially wasting resources.
System-Wide Coordination
Requires agreement on resource ranks across the entire system, which is difficult in dynamic or modular environments.
Example
Example
If a process holds a Tape Drive (rank 2), it may request a Disk Drive (rank 4) or Printer (rank 7), but not another Tape Drive or any lower-ranked resource — unless it first releases all current holdings.