 Hello and welcome to the session on Distributed Deadlock Detection Algorithms Part 2. Before we move forward, here are the learning outcomes. At the end of this session, students will be able to uniquely identify the functionalities of centralized deadlock detection algorithm, other age chasing algorithm, diffusion computation based algorithm for distributed deadlock detection. Completely centralized algorithm is the simplest centralized deadlock detection algorithm. A designated site is called the control site, which maintains the weight for graph of this entire system and checks it for the existence of deadlock cycles. All sites request and release resources, also local resources by sending request, resource and release resource messages to the control site respectively. When the control site receives a request resource or leave a resource message, it correspondingly updates its weight for graph. The control site checks the weight for graph for deadlocks whenever a request age is added to the weight for graph. The algorithm is conceptually simple and easy to implement, but unfortunately it is also highly inefficient because all resource acquisition and release the request must go through the control site, even when the resources are local. This results in large delays in responding to user request, large communication overhead and the condition of communication links near the control site. However, reliability is poor because if the control site fails, data system comes to halt because all the status information resides at the control site. Several problems of this algorithm such as large response time and the condition of communication links near the control site can be mitigated by having each site maintain its resource status locally and by having each site send its resource status to designated site periodically for construction of the global weight for graph and detection of deadlocks. Due to inherent communication delays and the lack of perfect synchronized clocks, the designated site maintain gate and inconsistent view of the system and detect false deadlocks. For example, suppose two resources R1 and R2 are stored at site S1 and S2 respectively. Suppose the following two transactions T1 and T2 started almost simultaneously at sites S3 and S4 respectively. Suppose the lock R1 request to T1 arrives at S1 and locks R2 followed by the lock R1 request of T2 which waits at S1. At this point, S1 reports its status T2 to T1 to a designated site. Thereafter, T1 unlocks R1, T2 locks R1, T1 makes a lock R2 and requests S2, T2 unlocks R1 and makes lock R2 request to S2. Now, suppose that the lock R2 request of T2 arrives at S2 and locks R2 followed by lock R2 request to T1 which waits at S2. At this point, S2 reports its status T1 to T2 to be designated site which after constructing the global wait for graph reports a false deadlock T1 to T2 and T2 to T1, other age chasing algorithm, the Michelle Merritt algorithm. In the deadlock detection algorithm of Michelle and Merritt, each node of transaction wait for graph has two labels, private and public. The private label of each node is unique to that node and initially both labels at a node have the same value. Algorithm detects a deadlock by propagating the public label of nodes in the backward direction in the TWF graph. When a transaction is blocked, the public and the private label of its node in its TWF graph are changed to a value greater than their previous values and greater than the public label of the blocking transaction. A block transaction periodically reads the public label of blocking transaction and replace its own public label with it provided that the blocking transactions public label is larger than its own. A deadlock is detected when a transaction receives its own public label. A deadlock resolution is a simple in this algorithm because only one process detects a deadlock and that process can resolve the deadlock by simply aborting itself. Sina-Natarajan algorithm. In Sina-Natarajan algorithm, transactions are assigned a unique priorities and antagonistic conflict is said to occur when a transaction waits for a data object that is blocked by a lower priority transaction. The algorithm initiates deadlock detection only when an antagonistic conflict occurs. The algorithm detects a deadlock by circulating a probe message through a cycle in the global TWF graph. A probe message is two tuple ij where ti is transaction that is initiated deadlock detection and tj is a transaction whose priority is the lowest among all transactions. The probe has traversed so far. An interesting property of this algorithm is that a deadlock is detected when a probe issued by the highest priority transaction in the cycle returns to it. Deadlock resolution is simple because the detector of deadlock and resolved deadlock by aborting the lowest priority transaction of the cycle. In diffusion computation based distributed deadlock detection algorithms, deadlock detection computation is diffused through the wait for graph of the system. These algorithms make use of eco algorithms to detect deadlocks. This computation is superimposed on the underlying distributed computation if this computation terminates the initiator declares a deadlock. To detect a deadlock, a process sends out a query message along all the outgoing edges in the wait for graph. These queries are successively propagated through the edges of the wait for graph. When a blocked process receives first 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. For all subsequent queries, this deadlock detection initiation it immediately sends back a reply message. The initiator of deadlock detection detects a deadlock when it receives reply for every query it had sent out. The algorithm work as follows. Initiate a diffusion computation for a blocked process p i. After that when a blocked process p k receives a query from i j k, then when a process p k receives a reply i j k, then if i is equal to k then declares a deadlock which send the engaging query. Here in this algorithm we assume that only one diffusion computation is initiated for the process. However, several diffusion computations may be initiated for a process. Here you have to note that at any time only one diffusion computation is current for any process. All others are outdated. The current diffusion computation can be distinguished from outdated ones by using sequence numbers. Here pause the video, think and answer. A blocked process initiates deadlock detection by sending query messages to all the processes from whom it is waiting to receive a message. These processes are called dependent set of process. Here is the reference. Thank you.