L 12 Deadlocks 2
L 12 Deadlocks 2
n resolution
• 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)
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
• 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
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