written 7.7 years ago by | • modified 7.7 years ago |
Mumbai University > Information Technology > Sem 6 > Distributed System
Marks: 10 Marks
Year: Dec 2016
written 7.7 years ago by | • modified 7.7 years ago |
Mumbai University > Information Technology > Sem 6 > Distributed System
Marks: 10 Marks
Year: Dec 2016
written 7.7 years ago by | • modified 7.7 years ago |
A deadlock is a condition in a system where a set of processes (or threads) have requests for resources that can never be satisfied.
An algorithm for detecting deadlocks in a distributed system was proposed by Chandy, Misra, and Haas in 1983. Processes request resources from the current holder of that resource. Some processes may wait for resources, which may be held either locally or remotely. Cross-machine arcs make looking for cycles, and hence detecting deadlock, difficult. This algorithm avoids the problem of constructing a Global WFG.
Each node has the same responsibility for, and will expend the same amount of effort in detecting deadlock
Four common models are used in building distributed deadlock control algorithms:
Path-pushing
path info sent from waiting node to blocking node
Edge-chasing
probe messages are sent along graph edges
Diffusion computation
echo messages are sent along graph edges
Global state detection
sweep-out, sweep-in (weighted echo messages); WFG construction and reduction.
Probe Based distributed Deadlock Detection Algorithm:
The following example is based on the same data used in the Silberschatz-Galvin algorithm example. In this case P1 initiates the probe message, so that all the messages shown have P1 as the initiator. When the probe message is received by process P3, it modifies it and sends it to two more processes. Eventually, the probe message returns to process P1. Deadlock!