Deadlock Recovery | Methods for Recovery

Deadlock Recovery

Deadlock recovery is generally used when deadlocks are rare and the cost of recovery is low.

Methods for Recovery

  1. Termination of processes
  • Some victim process is chosen for termination from the cycle of deadlocked processes.
  • This process is terminated, requiring a later restart
  • All the resources allocated to this processes are released, so that they may be reassigned to other deadlocked processes
  • With an appropriately chosen victim process, this should resolve the deadlock


  • 2.Rolling back processes
  • In order to rollback a victim process, there needs to have been some previous checkpoint at which time the state of the victim process was saved to stable storage
  • There must also be an assurance that the rolled back process is not holding any resource needed by the other deadlocked processes at that point
  • With an appropriately chosen victim process, needed resources will be released and assigned to other deadlocked processes.
  • This resolves deadlock.

Contributor's Info

Recovery from Deadlock

Recovery from Deadlock

When a system is deadlocked there two possibilities to recover from deadlock;

  • one is simply to abort one or more process to break circular wait, and other is preempt some process which are involved in the deadlock.
  • In order to abort a process; we check the priority of process, completion time, resources used, how many processes will need to be terminated etc.
  • Recovery from  deadlock is simply abort all deadlocked and reclaim resources.
  • Resources preemption is also one of the solution for deadlock recovery.


Contributor's Info