CH 6 Deadlock
CH 6 Deadlock
Chapter 6
Deadlock
Compiled by: Biniyam A.
2
Deadlock
• System Model
• Deadlock Characterization
• Methods for Handling Deadlocks
• Deadlock Prevention
• Deadlock Avoidance
• Deadlock Detection
• Recovery from Deadlock
3
Deadlock
• At the end of this chapter students are
expected to answer the following questions
• What is deadlock?
• How does a deadlock happens?
• 4 conditions for a deadlock to occur in OS
• Deadlock handling strategies
Chapter Objectives
4
• Process
• Pi requests instance of Rj Pi
Rj
• Pi is holding an instance of Rj Pi
Rj
Example of a Resource Allocation Graph
12
Resource Allocation Graph With A Deadlock
13
Graph With A Cycle But No Deadlock
14
Basic Facts
15
• Multiple instances
Detection algorithm
Recovery scheme
Single Instance of Each Resource Type
40
End