4 necessary deadlock conditions
mutual exclusion
hold and wait
no preemption
circular wait
what is hold and wait
allowing processes to hold previously acquired resources while waiting for additional ones
3 deadlock handling strategies
deadlock prevention
deadlock avoidance
deadlock detection/recovery
2 types of resources
reusable resources
consumable resources
idea of Havender’s linear ordering scheme
The part of Banker’s algorithm I’m likely to forget
To find available resources sum up each column in “Allocated” and subtract from Total-Max
Max Resources for process = Allocation + Need
When you are checking to see if a request is safe, subtract request value from “Available”. Then look at need matrix to see if any of the processes can be completed (“Available” has greater than or equal to the number of resources of each kind that are needed by that process).
If a process can be completed, subtract the need from “Available”. Then add “Max” to available. Repeat process to determine if all processes can be completed.
if yes = safe
if no = not safe
Resource graph semantics
if a process node has a directed edge towards a resource node = request for that resource
edge from resource node to process node = process is holding that resource
system model
a set of assumptions to reduce the complexity of deadlock detection
what is a wait-for graph? (WFG)
a resource graph without the resource nodes for simplicity
P1 –> P2 implies P1 –> R –> P2
centralize deadlock control algorithm