Resource Allocation Graph (RAG)
Add Edge
Banker's Algorithm - Safe State Checker
Configuration
Deadlock Recovery Strategies
Abort All Processes
Terminate all deadlocked processes. Simple but costly - all work is lost.
Abort One at a Time
Abort processes one by one until deadlock is resolved. Choose based on priority/cost.
Resource Preemption
Take resources from some processes and give them to others until deadlock breaks.
Rollback to Checkpoint
Roll back processes to a safe checkpoint state and restart from there.
Deadlock Prevention & Avoidance
Mutual Exclusion
Allow resource sharing where possible. Some resources (like read-only files) don't need exclusive access.
Hold and Wait
Require processes to request all resources at once before execution begins.
No Preemption
Allow the system to forcibly take resources from processes when necessary.
Circular Wait
Impose ordering on resource types and require processes to request resources in order.