Chap 7 Deadlock Conditions Flashcards
Hold and wait
A process may hold a resource at the same time it requests another one.
Mutual exclusion (exclusive use)
Once a process has been allocated a particular resource, the threads in the process have exclusive use of the resource. No other processes can use a resource while it is allocated to a process.
Circular wait
A situation can rise in which process p1 holds resource R1 while one of its threads requests resource R2, and process p2 holds R2 while one of its threads requests resource R1. There may be more than two processes involved in the circular wait.
No preemption
Resources can be released only by the explicit action in a process, rather than by the action of an external authority. This assumption includes the case in which a process places a request for a resource and the resource is not available. Then the process cannot withdraw its request.
Addressing Deadlock - Prevention
Design the system so that
deadlock is impossible
Addressing Deadlock - Avoidance
Construct a model of system
states, then choose a strategy that will not allow the system to go to a deadlock state
Addressing Deadlock - Detection & Recovery
Check for deadlock (periodically or sporadically), then recover
Addressing Deadlock - Manual intervention
Have the operator reboot the machine if it seems too slow