In a distributed system deadlock can neither be prevented nor avoided as the system is so vast that it is impossible to do so. Therefore, only deadlock detection can be implemented. The techniques of deadlock detection in the distributed system require the following:
- Progress – The method should be able to detect all the deadlocks in the system.
- Safety – The method should not detect false or phantom deadlocks.
There are three approaches to detect deadlocks in distributed systems. They are as follows:
- Centralized approach –
In the centralized approach, there is only one responsible resource to detect deadlock. The advantage of this approach is that it is simple and easy to implement, while the drawbacks include excessive workload at one node, single-point failure (that is the whole system is dependent on one node if that node fails the whole system crashes) which in turns makes the system less reliable.
- Distributed approach –
In the distributed approach different nodes work together to detect deadlocks. No single point failure ( that is the whole system is dependent on one node if that node fails the whole system crashes) as the workload is equally divided among all nodes. The speed of deadlock detection also increases.
- Hierarchical approach –
This approach is the most advantageous. It is the combination of both centralized and distributed approaches of deadlock detection in a distributed system. In this approach, some selected nodes or cluster of nodes are responsible for deadlock detection and these selected nodes are controlled by a single node.
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
- Deadlock Detection in Distributed Systems
- Hierarchical Deadlock Detection in Distributed System
- Chandy-Misra-Haas's Distributed Deadlock Detection Algorithm
- Difference between Deadlock Prevention and Deadlock Avoidance
- Deadlock Detection And Recovery
- Deadlock Detection Algorithm in Operating System
- Hashing in Distributed Systems
- Comparison - Centralized, Decentralized and Distributed Systems
- Interprocess Communication in Distributed Systems
- Synchronization in Distributed Systems
- Date's Twelve Rules for Distributed Database Systems
- Deadlock Prevention And Avoidance
- Introduction of Deadlock in Operating System
- Program for Deadlock free condition in Operating System
- Deadlock, Starvation, and Livelock
- Recovery from Deadlock in Operating System
- Difference between Deadlock and Starvation in OS
- Conditions for Deadlock in Operating System
- Deadlock Ignorance in Operating System
- Operating Systems | Input Output Systems | Question 5
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : Vidit_Gupta