07 lcd slide handout 1 - DEADLOCKS PDF

Preview:

Citation preview

Deadlocks

Introduction to Deadlocks

Deadlock Prevention

 

1   _________________________    ___________________________    ___________________________    ___________________________    ___________________________    ___________________________    ___________________________    ___________________________    ___________________________

*Property of STI J0024

Deadlock

condition wherein a set of processes cannot continue executing because each process is waiting for a resource that is being held or used by another process within the set

Figure 7.1 Example of a Deadlock

 

2  __________________________    ___________________________    ___________________________    ___________________________    ___________________________    ___________________________    ___________________________    ___________________________   ___________________________

*Property of STI J0024

Figure 7.2 Example of a Deadlock Using a Wait-For Graph

 

3   _________________________    ___________________________    ___________________________    ___________________________    ___________________________    ___________________________    ___________________________    ___________________________    ___________________________

*Property of STI J0024

Figure 7.3 Traffic Deadlock

 

4  __________________________    ___________________________    ___________________________    ___________________________    ___________________________    ___________________________    ___________________________    ___________________________   ___________________________

*Property of STI J0024

Necessary conditions for a deadlock:

Mutual exclusion

Hold and wait

No preemption

Circular wait

 

5   _________________________    ___________________________    ___________________________    ___________________________    ___________________________    ___________________________    ___________________________    ___________________________    ___________________________

*Property of STI J0024

Deadlocks can be prevented by removing at least one of the four conditions:

Removing the mutual exclusion condition

Removing the hold and wait condition

Removing the no preemption condition

Removing the circular wait condition

 

6  __________________________    ___________________________    ___________________________    ___________________________    ___________________________    ___________________________    ___________________________    ___________________________   ___________________________

 

Recommended