Session 26
Session 26
Disadvantages:
o Single point of failure.
Disadvantages:
o Delays in detecting global deadlocks, as local detectors may not
have enough information to detect the full deadlock cycle.
5.3. Edge Chasing Algorithms
Principle: When a process detects that it is waiting for a resource, it
sends a "probe" (or "token") along the edges of the WFG. If the probe
returns to the initiating process, a cycle (i.e., deadlock) is detected.
There are three well-known edge-chasing algorithms:
(i) Chandy-Misra-Haas Algorithm (Probe Algorithm)
Steps:
1. When a process Pi is waiting for a resource, it sends a probe
message to the process Pj holding the resource.
2. The probe contains information about the initiator, the sender, and
the recipient.
3. If Pj is also waiting for a resource, it forwards the probe to the
process holding that resource.
4. If the probe returns to the initiator, a deadlock is detected.
Advantages:
o No global coordination is required.
Disadvantages:
o It can generate high overhead in systems with many processes and
resources, as many probes might be sent.
o May result in unnecessary probes if there is no deadlock.
Disadvantages:
o More complex to implement.
Disadvantages:
o Gathering a global snapshot is challenging in distributed systems
due to asynchrony and message delays.
o High overhead, especially in large systems.
6. Deadlock Resolution
Once a deadlock is detected, it must be resolved. Several techniques include:
Abort one or more processes involved in the deadlock.
Preempt resources from some processes to break the circular wait
condition.
7. Performance Metrics for Deadlock Detection
Detection Delay: The time it takes for the system to detect a deadlock
after it occurs.
Message Complexity: The number of messages exchanged between
processes during deadlock detection.
Overhead: The computational and communication costs associated with
detecting deadlocks.
8. Conclusion
Distributed deadlock detection is crucial in maintaining resource
availability and ensuring the smooth operation of processes in distributed
systems.
Each detection algorithm has trade-offs between complexity, message
overhead, and speed of detection.
Edge-chasing algorithms are widely used due to their simplicity, while
snapshot-based methods provide a more global perspective but are more
costly.
9. References for Further Reading
Chandy, K. M., Misra, J., & Haas, L. M.: "Distributed Deadlock
Detection."
Singhal, M., & Kshemkalyani, A. D.: "An Efficient Distributed Deadlock
Detection Algorithm."
Raynal, M.: "Distributed Algorithms for Message-Passing Systems."
These notes provide an overview of distributed deadlock detection, including the
key concepts, challenges, and some well-known algorithms.