Prerequisite – Deadlock Introduction, deadlock detection
In the centralized approach of deadlock detection, two techniques are used namely: Completely centralized algorithm and Ho Ramamurthy algorithm (One phase and Two-phase).
- Completely Centralized Algorithm –
In a network of n sites, one site is chosen as a control site. This site is responsible for deadlock detection. It has control over all resources of the system. If a site requires a resource it requests the control site, the control site allocates and de-allocates resources and maintains a wait for graph. And at regular interval of time, it checks the wait for graph to detect a cycle. If cycle exits then it will declare system as deadlock otherwise the system will continue working. The major drawbacks of this technique are as follows:
- A site has to send request even for using its own resource.
- There is a possibility of phantom deadlock.
- HO Ramamurthy (Two-Phase Algorithm) –
In this technique a resource status table is maintained by the central or control site, if a cycle is detected then the system is not declared deadlock at first, the cycle is checked again as the system is distributed some or the other resource is vacant or freed by sites at every instant of time. Now, after checking if a cycle is detected again then, the system is declared as deadlock. This technique reduces the possibility of phantom deadlock but on the other hand time consumption is more.
- HO Ramamurthy (One Phase Algorithm) –
In this technique a resource status table and a process table is maintained by the central or control site if the cycle is detected in both processes and resource tables then, the system is declared as deadlock. This technique reduces time consumption but space complexity increases.
- Deadlock detection in Distributed systems
- Hierarchical Deadlock Detection in Distributed System
- Chandy-Misra-Haas's Distributed Deadlock Detection Algorithm
- Deadlock Detection And Recovery
- Deadlock Detection Algorithm in Operating System
- Operating Systems | Deadlock | Question 2
- Operating Systems | Deadlock | Question 1
- Interprocess Communication in Distributed Systems
- Operating Systems | Input Output Systems | Question 5
- Difference between Deadlock and Starvation in OS
- Deadlock Prevention And Avoidance
- Deadlock, Starvation, and Livelock
- Recovery from Deadlock in Operating System
- Introduction of Deadlock in Operating System
- Conditions for Deadlock in Operating System
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. 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 : RakshithSathish