User:Ashish m bisht/Resource preemption

Resource Preemption
Resource Preemption i.e. to implicitly release some resources from a process, is one of the ways to recover from a deadlock.To eliminate deadlocks using resource preemption, we successively preempt some resources from processes and give these resources to other processes until the deadlock cycle is broken. If preemption is required to deal with deadlocks, then three issues need to be addressed:

1. Selecting a victim - Minimize cost

2. Rollback - Return to some safe state, restart process for that state.

3. Resource Starvation - Same process may always be picked as victim, include number of rollback in cost     factor.

1. Selecting a victim: Which resources and which process are to be preempted? As in process termination, we must determine the order of preemption to minimize cost. Cost factors may include such parameters as the number of resources a deadlock process is holding, and the amount of time the deadlock process has thus far consumed during its execution.

2. Rollback: If we preempt a resource from a process,what should be done with that process? Clearly, it cannot continue with normal execution; it is missing some needed resource. We must rollback the process to some safe state, and then restart it from that state.

3. Resource Starvation : How can we ensure that resource starvation will not occur? That is, how can we guarantee that resources will not be preempted from the same process? Ashish m bisht (talk) 04:11, 18 August 2009 (UTC)