IOSR Journal of Engineering (IOSRJEN) www.iosrjen.org ISSN (e): 2250-3021, ISSN (p): 2278-8719 Vol. 06, Issue 04 (April. 2016), ||V2|| PP 01-05 International organization of Scientific Research 1 | P a g e A Modified Algorithm for Distributed Deadlock Detection in Generalized Model Sakshi Surve 1 , Sharad Bhatt 2 1 (University of Mumbai) geetams24@rediffmail.com) 2 (University of Mumbai) Bhatt.sh2@gmail.com) Abstract: - In a distributed system, a deadlock may occur when set of processes wait for resources from each other. A process involved in a deadlock waits indefinitely unless a special action is taken. Deadlock leaves the system into a blocking state with no process getting complete and also it reduces the throughput. In this paper a technique is presented that will improve the performance of Srinivasan distributed deadlock algorithm for multiple executions. In Srinivasan algorithm whenever multiple initiators invoke the algorithm one after the other same deadlock cycle and similar message transfers may be reported in more than one execution. So, in order to handle multiple executions an algorithm has been proposed which will not only reduce the number of message transfers but will also reduce the deadlock detection time. The proposed algorithm gives priority to different algorithm execution depending on their process id‟s along with this it allows lower priority executions to continue so that a deadlock that are not directly reachable from the higher priority execution could be detected. Keywords: - Distributed Deadlock, Generalized Model, Wait-for Graph I. INTRODUCTION In a distributed computing environment remote resources are needed by processes for their computation. Processes sends request message to remote sites, when remote resources are needed. Depending on the availability or unavailability of the resources, the processes are either given the requesting resources or are made to wait indefinitely. This leads to deadlock in distributed systems. A deadlock is defined as a time- dependent state in which a set of processes are waiting for resources from other processes in the same set indefinitely. As deadlock leaves the system into a blocking state with no transaction getting complete; therefore, they must be detected. In distributed systems many resource request model exists and depending on these models deadlock detection techniques also varies. In AND [2] model, a process remains blocked until all requested resources are granted. The existence of cycle in the wait-for graph (WFG) [2, 3] is a necessary and sufficient condition to detect deadlock. In OR model [2], a process remain blocked until it is not able to acquire any of the requested resource. The existence of knot in the WFG is a necessary and sufficient condition to determine a deadlock. In P out-of Q model [2], also known as generalized model, a process makes Q resource requests, and gets unblocked only when any P resources are granted. Neither cycle nor knot is a necessary and sufficient condition to detect a deadlock. So, the generalized deadlock can be detected by examining the presence of some complex topology in the WFG. This paper proposes a method that will improve the performance of Srinivasan [1] distributed deadlock algorithm. In Srinivasan algorithm whenever multiple initiators invoke the algorithm one after the other same deadlock cycle and similar message transfers may be reported in more than one execution. So, in order to handle multiple executions an algorithm has been proposed which will not only reduce the number of message transfers but will also reduce the deadlock detection time. The proposed algorithm gives priority to different algorithm execution depending on their process id‟s along with this it allows lower priority executions to continue so that a deadlock that are not directly reachable from the higher priority execution could be detected. The proposed algorithm will be evaluated and compared with Srinivasan algorithm on parameters like deadlock detection time and number of message transfer for both single and multiple executions. II. RELATED WORK Existing algorithms for the distributed deadlock detection in generalized model can be classified into two kinds: Distributed Centralized. In G. Bracha and S.Toueg [8] probes are forwarded along the edges of the WFG by the initiator, and the replies which represent granting of the requests are propagated backward to determine deadlocks. It uses 4 e messages and 4d time units to detect deadlocks, where e and d refers to the number of edges and the diameter of