Home | Projects | Notes > Operating Systems > Integrated Deadlock Strategy

Integrated Deadlock Strategy

 

Summary of 3 Deadlock Handling Strategies

ApproachCharacterized byDifferent schemesAdvantagesDisadvantages
Prevention most conservative
undercommits Rs
requesting all Rs at once works well for Ps that perform a single burst of activity
no preemption necessary
inefficient
delays process initiation
future resource requirements must be known by processes
   preemption works well with Rs that are easy to save and restore state preempts more often than necessary (may lead to starvation)
   resource ordering can be enforced at compile-time
does not need a complex run-time computation since problem is solved in system design
disallows different orders (need to request in certain order)
Avoidance less conservative than prevention, more conservative than detection (allows for higher resource utilization) Banker's algorithm (compute safe-state prior to completing a R grant) no preemption necessary future R requirements must be known by OS
Ps can be blocked for long periods (starvation)
Detection least conservative (always grant when available - allows for highest R utilization) periodically compute (i.e., algorithm) for deadlock never delays process initiation
facilitates online handling
inherent preemption losses

 

An Integrated Deadlock Strategy

 

 

References

Stallings, W. (2018). Operating Systems: Internals and Design Principles (9th ed.). Pearson Education, Inc.