A Priority Based Distributed Deadlock Detection Algorithm

Deadlock handling is an important component of transaction management in a database system. In this paper, we contribute to the development of techniques for transaction management by presenting an algorithm for detecting deadlocks in a distributed database system. The algorithm uses priorities for transactions to minimize the number of messages initiated for detecting deadlocks. It does not construct any wait-for graph but detects cycles by an edge-chasing method. It does not detect any phantom deadlock (in the absence of failures), and for the resolution of deadlocks it does not need any extra computation. The algorithm also incorporates a post-resolution computation that leaves information characterizing dependence relations of remaining transactions of the deadlock cycle in the system, and this will help in detecting and resolving deadlocks which may arise in the future. An interesting aspect of this algorithm is that it is possible to compute the exact number of messages generated for a given deadlock configuration. The complexity is comparable to the best algorithm reported. We first present a basic algorithm and then extend it to take into account shared and exclusive lock modes, simultaneous acquisition of multiple locks, and nested transactions.

[1]  Daniel A. Menascé,et al.  Locking and Deadlock Detection in Distributed Data Bases , 1979, IEEE Transactions on Software Engineering.

[2]  Irving L. Traiger,et al.  The notions of consistency and predicate locks in a database system , 1976, CACM.

[3]  E. B. Moss,et al.  Nested Transactions: An Approach to Reliable Distributed Computing , 1985 .

[4]  Leslie Lamport,et al.  Time, clocks, and the ordering of events in a distributed system , 1978, CACM.

[5]  Arie Shoshani,et al.  System Deadlocks , 1971, CSUR.

[6]  Laura M. Haas,et al.  Distributed deadlock detection , 1983, TOCS.

[7]  B. Dasarathy,et al.  Timing Constraints of Real-Time Systems: Constructs for Expressing Them, Methods of Validating Them , 1989, IEEE Transactions on Software Engineering.

[8]  Charles T. Davies,et al.  Recovery semantics for a DB/DC system , 1973, ACM Annual Conference.

[9]  Richard C. Holt,et al.  Some deadlock properties of computer systems , 1971, SOSP '71.

[10]  Rudolf Bayer,et al.  Dynamic Timestamp Allocation for Transactions in Database Systems , 1982, DDB.

[11]  K. Mani Chandy,et al.  A distributed algorithm for detecting resource deadlocks in distributed systems , 1982, PODC '82.

[12]  Ron Obermarck,et al.  Distributed deadlock detection algorithm , 1982, TODS.

[13]  Daniel J. Rosenkrantz,et al.  System level concurrency control for distributed database systems , 1978, TODS.

[14]  Philip A. Bernstein,et al.  Concurrency Control in Distributed Database Systems , 1986, CSUR.