Deadlock
- Blocked / Asleep state
- Deadlock state
- Deadlock vs Starvation
Classification by preemptive availability
- Preemptible resources
- Non-preemptible resources
Classification by allocation unit
- Total allocation resources
- Partitioned allocation resources
Classification based on concurrent use
- Exclusive allocation resources
- Processor, memory, disk drive
- Shared allocation resource
Classification based on reusability
- SR(Serially-reusable Resources)
- Processor, memory, disk drive, program
- CR (Consumable Resources)
Deadlock Model
- Graph Model
- State Transition Model
Graph Model
State Transition Model
Deadlock Occurrence Conditions
- Exclusive use of resources
- Non-preemptible resources
- Hold and wait (Partial allocation)
- Circular wait
Deadlock solution
- Deadlock prevention methods
- Deadlock avoidance method
- Deadlock detection and deadlock recovery methods
Deadlock Prevention
- Remove one of the four deadlock occurrence requirements
- Exclusive use of resources
- Non-preemptible resources
- Hold and wait (Partial allocation)
- Circular wait
- Low device utilization
- Reduced system throughput
- Not practical
Deadlock Avoidance
- Safe state
- Unsafe state
- High overhead
- Low resource utilization
- Not practical
Deadlock Detection
- Resource Allocation Graph(RAG)
- Directed, bipartite Graph
Deadlock Detection Method
- Graph reduction
- Completely reduced
- Irreducible
Deadlock Recovery
- deadlock recovery methods
- Process termination
- Resource preemption
Process termination
- Termination cost model
- Termination cost
- Precess priority
- Process type
- Accumulated execution time of the process
- Remaining time of the process
- Accounting cost
- Etc.
Resource preemption
- Preemption cost model
- Minimum cost recovery method
Reference
Deadlock Resolution