0% found this document useful (0 votes)
14 views4 pages

FT 5 a& B Sec Answer Distributed Computing

The document discusses criteria for distributed deadlock detection, emphasizing the need for algorithms to ensure progress and safety. It details the Chandy-Misra-Haas algorithm's effectiveness in both AND and OR models, as well as the concept of false deadlocks and various deadlock resolution strategies. Additionally, it outlines different classifications of distributed deadlock detection algorithms, including path-pushing, edge-chasing, diffusion computation-based, and global state detection-based algorithms.

Uploaded by

ganesananjalai77
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views4 pages

FT 5 a& B Sec Answer Distributed Computing

The document discusses criteria for distributed deadlock detection, emphasizing the need for algorithms to ensure progress and safety. It details the Chandy-Misra-Haas algorithm's effectiveness in both AND and OR models, as well as the concept of false deadlocks and various deadlock resolution strategies. Additionally, it outlines different classifications of distributed deadlock detection algorithms, including path-pushing, edge-chasing, diffusion computation-based, and global state detection-based algorithms.

Uploaded by

ganesananjalai77
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

FT 5 Distributed Computing

CSE A & B

1. What are the correction criteria for distributed deadlock?


Correctness Criteria: A deadlock detection algorithm must satisfy the following two conditions:
(i) Progress (No undetected deadlocks):
The algorithm must detect all existing deadlocks in finite time.
In other words, after all wait-for dependencies for a deadlock have formed, the algorithm
should not wait for any more events to occur to detect the deadlock.
(ii) Safety (No false deadlocks):
The algorithm should not report deadlocks which do not exist (called phantom or false
deadlocks).
2. How beneficial of the Chandy-Misra-Haas algorithm in the AND model and OR model?

The Chandy-Misra-Haas algorithm works well for deadlock detection:

 AND model: In the AND model, processes need all requested resources to proceed. The
algorithm efficiently detects deadlocks by propagating probes along the dependency chains.
 OR model: In the OR model, a process can proceed if any one of its requested resources is
granted. The algorithm needs to handle more complex situations, but it's still effective.

Benefit: The algorithm is non-centralized, reduces communication overhead, and suits both models with
minimal modifications.

3. What is a false deadlock and when does it occurs?


A false deadlock occurs when a system mistakenly detects a deadlock due to outdated or
inconsistent information (e.g., message delays, incorrect timeouts). This can happen when
detecting processes lack synchronization or rely on stale state data.

4. What is deadlock resolution?


Deadlock resolution involves breaking existing wait-for dependencies between the processes to
resolve the deadlock.
It involves rolling back one or more deadlocked processes and assigning their resources to
blocked processes so that they can resume execution.
5. What is the advantage of edge-chasing algorithms?
The advantage of edge-chasing algorithms is their ability to detect deadlocks without
centralized control. They operate by passing "probes" (or tokens) along resource dependency
edges, and a deadlock is detected when the probe returns to its origin, signifying a cycle. This
approach reduces the risk of single points of failure and lowers communication overhead.

6. Explain Knapp’s classification of distributed deadlock detection algorithms.


Path-pushing algorithms
 In path-pushing algorithms, distributed deadlocks are detected by maintaining an
explicit global WFG. The basic idea is to build a global WFG for each site of the
distributed system.
 In this class of algorithm, whenever deadlock computation is performed, each site sends
its local WFG to all the neighboring sites.
 After the local data structure of each site is updated, this updated WFG is then passed
along to other sites, and the procedure is repeated until one site has a sufficiently
complete picture of the global state to announce deadlock or to establish that no
deadlocks are present.
 This feature of sending around the paths of the global WFG has led to the term path-
pushing algorithm Path-pushing algorithms
Edge-chasing algorithms
 edge-chasing algorithm, the presence of a cycle in a distributed graph structure is
verified by propagating special messages called probes along the edges of the graph.
 These probe messages are different to the request and reply messages. The formation
of a cycle can be detected by a site if it receives the matching probe sent by it
previously.
 Whenever a process that is executing receives a probe message, it simply discards this
message and continues. Only blocked processes propagate probe messages along their
outgoing edges.
The main advantage of edge-chasing algorithms is that probes are fixed size
messages that are normally very short.

Diffusing computation-based algorithms


 In diffusion computation-based distributed deadlock detection algorithms, deadlock
detection computation is diffused through the WFG of the system.
 These algorithms make use of echo algorithms to detect deadlocks. If this computation
terminates, the initiator declares a deadlock.
 The main feature of the superimposed computation is that the global WFG is implicitly
reflected in the structure of the computation.
 The actual WFG is never built explicitly. To detect a deadlock, a process sends out query
messages along all the outgoing edges in the WFG. These queries are successively
propagated (i.e.,diffused) through the edges of the WFG.
 Queries are discarded by a running process and are echoed back by blocked processes
in the following way: when a blocked process first receives a query message for a
particular deadlock detection initiation, it does not send a reply message until it has
received a reply message for every query it sent
Global state detection-based algorithms
 Global state detection-based deadlock detection algorithms exploit the following facts:
(i) a consistent snapshot of a distributed system can be obtained without freezing the
underlying computation, and (ii) a consistent snapshot may not represent the system
state at any moment in time, but if a stable Global state detection-based deadlock
detection algorithms exploit the following facts: (i) a consistent snapshot of a
distributed system can be obtained without freezing the underlying computation, and
(ii) a consistent snapshot may not represent the system state at any moment in time,
but if a stable property holds in the system before the snapshot collection is initiated,
this property will still hold in the snapshot.

7. Outline the Chandy-Misra-Haas algorithm to detect deadlock in OR model and illustrate the
algorithm.

Chandy–Misra–Haas’s distributed deadlock detection algorithm for the OR model, which is based on
the approach of diffusion-computation

A blocked process determines if it is deadlocked by initiating a diffusion computation. Two types


of messages are used in a diffusion computation: query(i, j, k) and reply(i, j, k), denoting that
they belong to a diffusion computation initiated by a process Pi and are being sent from process
Pj to
process Pk.

1. If this is the first query message received by Pk for the deadlock detection initiated by Pi
(called the engaging query), then it propagates the query toall the processes in its dependent
set and sets a local variable numki to the number of query messages sent.
2. If this is not the engaging query, then Pk returns a reply message to it immediately provided
Pk has been continuously blocked since it received the corresponding engaging query.
Otherwise, it discards the query.

Process Pk maintains a boolean variable waitki that denotes the fact that it has been
continuously blocked since it received the last engaging query from process Pi. When a blocked
process Pk receives a reply(i, j, k) message, it decrements numki only if waitki holds. A process
sends a reply message in response to an engaging query only after it has received a reply to
every
query message it has sent out for this engaging query.
The initiator process detects a deadlock when it has received reply messages to all the query
messages it has sent out.
The algorithm

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy