1/16
flashcards made from Modelling Deadlocks slides from week 9
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Deadlock Definition
• A set of processes is deadlocked if:
– Each process in the set is waiting for an event
– That event can be caused only by another process in the set
Conditions for Resource Deadlocks
• Four conditions that must all hold for a deadlock to exist:
1. Mutual exclusion
• Each resource is either currently assigned to exactly one process or is available
2. Hold and wait
• Processes currently holding resources that were granted earlier can request new resources
3. No preemption
• Resources previously granted cannot be forcibly taken away from a process. They must be explicitly released by the process holding them
4. Circular wait condition
• There must be a circular list of two or more processes, each of which is waiting for a resource held by the next member of the chain
Deadlock Modeling (1)
Deadlock Modeling (2)
Deadlock Modeling (2) part 2
Deadlock Modeling (2) part 3
Deadlock Modeling (2) part 4
Deadlock Modeling (3)
Deadlock Modeling (3) part 2
Deadlock Modeling (3) part 3
Deadlock Modeling (3) part 4
Deadlock Modeling (3) part 5
Deadlock Modeling (3) part 6
Deadlock Modeling (4)
Deadlock Modeling (4) part 2
Deadlock Modeling (4) part 3
Deadlock Modeling (5)
• Strategies that are used for dealing with deadlocks:
1. Ignore the problem, maybe it will go away…
2. Detection and recovery. Let deadlocks occur, detect them, and take action
3. Dynamic avoidance by careful resource allocation
4. Prevention, by structurally negating one of the four required conditions