0% found this document useful (0 votes)
45 views

L 12 Deadlocks 2

There are two main approaches to distributed deadlock detection: path-pushing and edge-chasing. Path-pushing algorithms disseminate wait-for-graphs (WFGs) as paths between processes and detect cycles. Edge-chasing algorithms use probe messages that circulate between blocked processes and those holding requested resources, detecting cycles if a process receives its own probe. Hierarchical algorithms organize sites into a tree structure and detect deadlocks within and between clusters. Performance is evaluated based on number and size of messages to detect deadlocks and factors like deadlock persistence time.

Uploaded by

sankarmohit
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views

L 12 Deadlocks 2

There are two main approaches to distributed deadlock detection: path-pushing and edge-chasing. Path-pushing algorithms disseminate wait-for-graphs (WFGs) as paths between processes and detect cycles. Edge-chasing algorithms use probe messages that circulate between blocked processes and those holding requested resources, detecting cycles if a process receives its own probe. Hierarchical algorithms organize sites into a tree structure and detect deadlocks within and between clusters. Performance is evaluated based on number and size of messages to detect deadlocks and factors like deadlock persistence time.

Uploaded by

sankarmohit
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Distributed deadlock detection

Distributed and hierarchical


deadlock detection, deadlock
resolution n Path-pushing
u WFG is disseminated as paths — sequences of edges
n detection
u Deadlock if process detects local cycle
u distributed algorithms
n Edge-chasing
F Obermarck’s path-pushing
u Probe messages circulate
F Chandy, Misra, and Haas’s edge-chasing
u Blocked processes forward probe to processes holding
u hierarchical algorithms
requested resources
F Menasce and Muntz’s algorithm
u Deadlock if initiator receives own probe
F Ho and Ramamoorthy’s algorithm

n resolution

Obermarck’s Path-Pushing Chandy, Misra, and Haas’s Edge-Chasing


n Individual sites maintain local WFGs n When a process has to wait for a resource (blocks), it sends a
u Nodes for local processes probe message to process holding the resource
u Node “Pex” represents external processes n Process can request (and can wait for) multiple resources at once
F Pex1 -> P1 -> P2 ->P3 -> Pex2 n Probe message contains 3 values:
n Deadlock detection: u ID of process that blocked
u site Si finds a cycle that does not involve Pex – deadlock
u ID of process sending message
u site Si finds a cycle that does involve Pex – possibility of a deadlock
u ID of process message was sent to
F sends a message containing its detected cycle to all other sites

• to decrease network traffic the message is sent only when F (unclear why the latter two identifiers are necessary)

Pex1 > Pex2 n When a blocked process receives a probe, it propagates the probe
• assumption: the identifier of a process spanning the sites is to the process(es) holding resources that it has requested
the same! u ID of blocked process stays the same, other two values updated
F If site Sj receives such a message, it updates its local WFG as appropriate
graph, and reevaluates the graph (possibly pushing a path
u If the blocked process receives its own probe, there is a
again)
deadlock
n Can report a false deadlock
n size of a message is O(1)

Performance evaluation of Menasce and Muntz’


Obermarck’s and Chandy-Misra-Haas hierarchical deadlock detection
algorithms
n Obermarck’s n Sites (called controllers) are organized in a tree
u on average(?) only half the sites involved in deadlock send n Leaf controllers manage resources
messages u Each maintains a local WFG concerned only about its own

u every such site sends messages to all other sites, thus resources
F n(n–1)/2 messages to detect deadlock n Interior controllers are responsible for deadlock detection
F for n sites u Each maintains a global WFG that is the union of the WFGs

u size of a message is O(n)


of its children
u Detects deadlock among its children
n Chandy, Misra, and Haas’s
u given n processes, a process may be blocked on up to (n-1)
n changes are propagated upward either continuously or
processes, thus periodically
F m(n–1)/2 messages to detect deadlock

• m processes, n sites
u size of a message is 3 integers
Ho and Ramamoorthy’s Estimating performance of deadlock
hierarchical deadlock detection detection algorithms
n Sites are grouped into disjoint clusters n Usually measured as the number of messages exchanged to
n Periodically, a site is chosen as a central control site detect deadlock
u Central control site chooses a control site for each cluster u Deceptive since message are also exchanged when there is

n Control site collects status tables from its cluster, and uses the no deadlock
Ho and Ramamoorthy one-phase centralized deadlock detection u Doesn’t account for size of the message

algorithm to detect deadlock in that cluster n Should also measure:


n All control sites then forward their status information and WFGs u Deadlock persistence time (measure of how long resources
to the central control site, which combines that information into a are wasted)
global WFG and searches it for cycles F Tradeoff with communication overhead
n Control sites detect deadlock in clusters u Storage overhead (graphs, tables, etc.)
n Central control site detects deadlock between clusters u Processing overhead to search for cycles

u Time to optimally recover from deadlock

Deadlock resolution
n resolution – aborting at least one process (victim) in the cycle and
granting its resources to others
n efficiency issues of deadlock resolution
u fast – after deadlock is detected the victim should be quickly
selected
u minimal – abort minimum number of processes, ideally abort less
“expensive” processes (with respect to completed computation,
consumed resources, etc.)
u complete – after victim is aborted, info about it quickly removed
from the system (no phantom deadlocks)
u no starvation – avoid repeated aborting of the same process

n problems
u detecting process may not know enough info about the victim
(propagating enough info makes detection expensive)
u multiple sites may simultaneously detect deadlock

u since WFG is distributed removing info about the victim takes


time

You might also like