A survey of distributed deadlock detection algorithms
A Survey of Distributed Deadlock
Ahmed K. Elmagarmid
Computer Engineering Program
Department of Electrical Engineering
Pennsylvania State University
• An algorithm which determines whether a deadlock has occurred in
• There are deadlock algorithms which can be used in various
• Correctness or effectiveness of an algorithm is mainly based on 2
Detection of the deadlock in finite time
If a deadlock is detected, it should exist.
• Event and action based algorithm
• Not effective enough in detecting deadlocks.
• This scheme suffers from phantom deadlocks since blocking pairs,
which are basically graph update messages, may arrive out of
• If the deletion message is ignored, a transaction would become
ostensibly blocked. This, in turn, could result in phantom deadlock
• Creates TWF(Transaction Wait for graph)
• Colored graphs represent the states of request nodes.
• Gray - Resource not accessible , White – Resource is free, Black –
Resource in use
• Probe is ordered only if the resource is gray or black .
• Probes are different from requests or replies and are only meant for
• Builds a TWG of the current system.
• Create a node called “external” which sends and receives replies and
• When a deadlock occurs each node is initialized and checks all the
• Select a victim which caused the deadlock which doesn’t contain
external and break down all its cycles.
• Doesn’t work all the time and detects false deadlocks because it
detects false deadlocks because the wait-for graphs constructed do
not represent an overall of the global system at any instant.
• Edge chasing algorithm which uses labels given to track transactions which have same
Three steps in this Algorithm
• Block Step – When the transaction becomes blocked waiting for a second transaction.
• Active Step - When a transaction gets a resource
• Detect Step - Deadlock is detected
• The scheme of Menasce [MENASCE79] requires at each site storage proportional to the size of
local transaction wait-for graph. The edges of this graph are both direct and indirect (condensed).
Though the condensed edges require extra memory, it may not be substantial in most cases. The
number of messages required for deadlock detection may become to be exponential. As
mentioned before, the scheme does not detect all deadlocks and detects false deadlocks.
• The schemes of [OBERMACK82] have long deadlock messages because of the wait-for graph
information sent as part of these messages which are helpful during the deadlock detection
• The schemes of Mitchell use probe detection technique which is much more effective than the
Chandy and menasce.
A particular slide catching your eye?
Clipping is a handy way to collect important slides you want to go back to later.