Deadlock Flashcards
Can be taken away from a process without any side effects
preemptable resource
Cannot be taken away from current process without any side effects
nonpremptable resource
Each resource is either currently assigned to one process or available
mutual exclusion condition
Process currently holding resources that were granted earlier can still request new resources
hold and wait condition
Resources previously granted cannot be forcibly taken away from a process
no-premption condition
Must be two or more processes which are waiting for a resource held by another process
Circular wait condition
- Ignore problem and hope it resolves itself
- detection and recovery
- dynamic avoidance by careful resource allocation
- prevention by not allowing one of the four deadlock conditions to exist
Strategies with deadlock
Take away a resource from current owner and give to another process
Recovery through preemption
Checkpoint system state. When deadlock detected, rollback process to checkpoint before it acquired resource
Recovery through rollback
Kill process to break cycle. Attempt to select process that is safest to kill
Recovery through killing
Some schedling order in which every process can be ran to completion
safe state
Do not imply deadlock, but opposite implies lack of deadlock
nonsafe states
Assure that at least one condition of deadlock is never satisfied
deadlock prevention
Processes can request resource whenever, but all requests must be made in defind order
global ordering of processes to attack circular wait