IAT III Ans Key Dis Comp
IAT III Ans Key Dis Comp
PART-A
7. How beneficial is the Chandy – Misra – Haas algorithm in the AND model and OR
model?
The Chandy-Misra-Haas (CMH) algorithm is considered one of the best deadlock detection
algorithms for distributed systems, and is especially useful in the AND model:
AND model
The CMH algorithm is an edge-chasing algorithm that uses a unique message to detect
deadlocks in distributed systems. The worst-case complexity of the algorithm is
s(s−1)/2s transmit steps, where is the number of processes in the cycle.
Benefits
The CMH algorithm is a fully distributed algorithm that uses probes to detect
deadlocks. When a process requests a resource and it fails or times out, the process sends a
probe message to each process that holds one or more of its requested resources. The probe
message contains the IDs of the blocked process, the sending process, and the receiving
process.
9.Which are the three basic approaches for implementing distributed mutual exclusion?
The three basic approaches for implementing distributed mutual exclusion are:
Token-based approach: Only one process at a time has the token and the lock on the
resource. This guarantees mutual exclusion and well-defined order, so starvation cannot
occur. However, if a token is lost, it will need to be regenerated.
Non-token-based approach: A distributed algorithm that uses message exchange to
realize mutual exclusion among nodes in a computer network.
Quorum-based approach: Another approach for implementing distributed mutual
exclusion.