Summary of Deadlock strategies


Table 3.1: Summary of Deadlock strategies
Principle Resource Allocation Strategy Different Schemes Major Advantages Major Disadvantages
DETECTION Very liberal; grant resources as requested Invoke periodically to test for deadlock 1- Never delays process initiation 2- Facilitates on-line handling Inherent preemption losses
PREVENTION Conservative; undercommits resources Requesting all resources at once 1-Works well for processes with single burst of activity 2- No preemption is needed 1- Inefficient 2-Delays process initiation
Preemption Convenient when applied to resources whose state can be saved and restored easily 1- Preempts more often then necessary 2-Subject to cyclic restart
Resource ordering 1- Feasible to enforce via compile time checks 2- Needs no run-time computation 1- Preempts without immediate use 2- Disallows incremental resource requests
AVOIDANCE Selects midway between that of detection and prevention Manipulate to find at least one safe path No preemption necessary 1- Future resource requirements must be known 2- Processes can be blocked for long periods

2004-05-25