- Attacking the No Preemption Condition; Can resources be preempted? If a process' requests (holding certain resources) is denied, that process must release its unused resources and request them again, together with the additional resource.
- The third necessary condition for deadlocks is that there be no preemption of resources that have already been allocated.
- To ensure that this condition does not hold, we can use the following protocol.
- If a process is holding some resources and requests another resource that cannot be immediately allocated to it (that is, the process must wait), then all resources currently being held are preempted.
- The preempted resources are added to the list of resources for which the process is waiting. The process will be restarted only when it can regain its old resources, as well as the new ones that it is requesting.
Cem Ozdogan
2011-02-14