Open In App

Deadlock Handling Strategies in Distributed System

The following are the strategies used for Deadlock Handling  in Distributed System:

1. Deadlock Prevention: As the name implies, this strategy ensures that deadlock can never happen because system designing is carried out in such a way. If any one of the deadlock-causing conditions is not met then deadlock can be prevented. Following are the three methods used for preventing deadlocks by making one of the deadlock conditions to be unsatisfied:



2. Deadlock Avoidance: In this strategy, deadlock can be avoided by examining the state of the system at every step. The distributed system reviews the allocation of resources and wherever it finds an unsafe state, the system backtracks one step and again comes to the safe state. For this, resource allocation takes time whenever requested by a process. Firstly, the system analysis occurs whether the granting of resources will make the system in a safe state or unsafe state then only allocation will be made.

3. Deadlock Detection and Recovery: In this strategy, deadlock is detected and an attempt is made to resolve the deadlock state of the system. These approaches rely on a Wait-For-Graph (WFG), which is generated and evaluated for cycles in some methods. The following two requirements must be met by a deadlock detection algorithm: 



There are different types of deadlock detection techniques:

There are four classes for the Distributed Detection Algorithm:

To recover from a deadlock, one of the methods can be followed:

Article Tags :