title | created | modified |
---|---|---|
Operating System |
2021-07-09T01:12:29.013Z |
2021-07-13T01:42:25.532Z |
- Deadlock ignorance
- Deadlock prevention
- Deadlock avoidance
- Deadlock detection and recovery
Disabling or preventing the conditions that can lead to deadlock will prevent deadlock.
Condition | Approach
- Mutual Exclusion - resource can only be used by one process | Spool everything - drop all jobs in pool and resource will be processing them one by one
- Hold and wait - hold the remaining resources and wait for others | Request all resources initially - neither hold nor wait. It's difficult to know what resources may be needed beforehand.
- No preemption | take resources away
- Circular wait | order resources numerically and allocate resources in increasing order. So, there will be no cycle.
Preventing circular wait is only possible for prevention of deadlock.