Deadlocks

References:

  1. Abraham Silberschatz, Greg Gagne, and Peter Baer Galvin, "Operating System Concepts, Eighth Edition ", Chapter 7

7.1 System Model

7.2 Deadlock Characterization


New Sidebar in Ninth Edition

7.2.1 Necessary Conditions

7.2.2 Resource-Allocation Graph

7.3 Methods for Handling Deadlocks

7.4 Deadlock Prevention

7.4.1 Mutual Exclusion

7.4.2 Hold and Wait

7.4.3 No Preemption

7.4.4 Circular Wait

7.5 Deadlock Avoidance

7.5.1 Safe State

  Maximum Needs Current Allocation
P0
10
5
P1
4
2
P2
9
2

7.5.2 Resource-Allocation Graph Algorithm

7.5.3 Banker's Algorithm

7.5.3.1 Safety Algorithm

7.5.3.2 Resource-Request Algorithm ( The Bankers Algorithm )

7.5.3.3 An Illustrative Example

7.6 Deadlock Detection

7.6.1 Single Instance of Each Resource Type

7.6.2 Several Instances of a Resource Type

7.6.3 Detection-Algorithm Usage

7.7 Recovery From Deadlock

7.7.1 Process Termination

7.7.2 Resource Preemption

7.8 Summary