This Article 
   
 Share 
   
 Bibliographic References 
   
 Add to: 
 
Digg
Furl
Spurl
Blink
Simpy
Google
Del.icio.us
Y!MyWeb
 
 Search 
   
A One-Phase Algorithm to Detect Distributed Deadlocks in Replicated Databases
November/December 1999 (vol. 11 no. 6)
pp. 880-895

Abstract—Replicated databases that use quorum-consensus algorithms to perform majority voting are prone to deadlocks. Due to the P-out-of-Q nature of quorum requests, deadlocks that arise are generalized deadlocks and are hard to detect. We present an efficient distributed algorithm to detect generalized deadlocks in replicated databases. The algorithm performs reduction of a distributed wait-for-graph (WFG) to determine the existence of a deadlock. If sufficient information to decide the reducibility of a node is not available at that node, the algorithm attempts reduction later in a lazy manner. We prove the correctness of the algorithm. The algorithm has a message complexity of $2e$ messages and a worst-case time complexity of $2d+2$ hops, where $e$ is the number of edges and $d$ is the diameter of the WFG. The algorithm is shown to perform significantly better in both time and message complexity than the best known existing algorithms. We conjecture that this is an optimal algorithm, in time and message complexity, to detect generalized deadlocks if no transaction has complete knowledge of the topology of the WFG or the system and the deadlock detection is to be carried out in a distributed manner.

[1] D. Barbara, H. Garcia-Molina, and A. Spauster, “Increasing Availability Under Mutual Exclusion Constraints with Dynamic Vote Reassignment,” ACM Trans. Computer Systems, vol. 7, no. 4, pp. 394-426, Nov. 1989.
[2] C. Beeri and R. Obermarck, “A Resource Class Independent Deadlock Detection Algorithm,” Technical Report No. RJ-3077, IBM Research Laboratory, San Jose, Calif., 1981.
[3] P. Bernstein, V. Hadzilacos, and N. Goodman, Concurrency Control and Recovery in Database Systems. Addison-Wesley, 1987.
[4] B. Bhargava and A. Helal, “Efficient Availability Mechanisms in Distributed Database Systems,” Proc. Int'l Conf. Information and Knowledge Management, pp. 645-654, Nov. 1993.
[5] B. Bhargava and A. Helal, “Performance Evaluation of Quorum Consensus Replication Method,” Proc. Int'l Conf. Computer Performance and Dependability Symp., pp. 165-172, Apr. 1995.
[6] G. Bracha and S. Toueg, “Distributed Deadlock Detection,” Distributed Computing, vol. 2, pp. 127-138, 1987.
[7] J. Brzezinski, J.M. Helary, M. Raynal, and M. Singhal, “Deadlock Models and Generalized Algorithm for Distributed Deadlock Detection,” J. Parallel and Distributed Computing, vol. 31, no. 2, pp. 112-125, Dec. 1995.
[8] K.M. Chandy, J. Misra, and L. Hass, "Distributed Deadlock," ACM Trans. Computer Systems, vol. 1, no. 2, pp. 144-156, May 1983.
[9] E.W. Dijkstra and C.S. Scholten, “Termination Detection for Diffusing Computations,” Information Processing Letters, vol. 11, no. 1, pp. 1-4, Aug. 1980.
[10] D.K. Gifford, “Weighted Voting for Replicated Data,” Proc. Seventh ACM SIGOPS Symp. Operating Systems Principles, pp. 150-159, Dec. 1979.
[11] V.G. Gligor and S.H. Shattuck, “On Deadlock Detection in Distributed Systems,” IEEE Trans. Software Eng., vol. 6, no. 5, pp. 435-440, 1980.
[12] K. Goldman and N. Lynch, “Quorum Consensus in Nested Transaction Systems,” ACM Trans. Database Systems, vol. 19, no. 4, pp. 537-585, Dec. 1994.
[13] J.N. Gray, P. Homan, H.F. Korth, and R.L. Obermarck, “A Strawman Analysis of the Probability of Waiting and Deadlock in a Distributed System,” Technical Report No. 3066, IBM Research Laboratory, San Jose, Calif., 1981.
[14] T. Herman and K.M. Chandy, “A Distributed Procedure to Detect AND/OR Deadlocks,” Technical Report No. TR-LCS-8301, Univ. of Texas, Austin, Feb. 1983.
[15] G.S. Ho and C.V. Ramamoorthy, “Protocols for Deadlock Detection in Distributed Database Systems,” IEEE Trans. Software Eng., vol. 8, no. 6, pp. 554-557, Nov. 1982.
[16] C.A.R. Hoare,“Communicating sequential processes,” Comm. of the ACM, vol. 21, no. 8, pp. 666-677, Aug. 1978.
[17] M. Hofri, “On Timeout for Global Deadlock Detection in Decentralized Database Systems,” Information Processing Letters, vol. 51, no. 6, pp. 295-302, 1994.
[18] R.C. Holt, “Some Deadlock Properties of Computer Systems,” ACM Computing Surveys, vol. 4, no. 3, pp. 179-195, 1972.
[19] E. Knapp, "Deadlock Detection in Distributed databases Systems," ACM Computing Surveys, pp. 303-328, Dec. 1987.
[20] A. Kshemkalyani and M. Singhal, “On Characterization and Correctness of Distributed Deadlock Detection,” J. Parallel and Distributed Computing, vol. 22, no. 1, pp. 44-59, July 1994.
[21] A.D. Kshemkalyani and M. Singhal, "Efficient Detection and Resolution of Generalized Distributed Deadlocks," IEEE Trans. Software Eng., vol. 20, no. 1, pp. 43-54, Jan. 1994.
[22] A.D. Kshemkalyani and M. Singhal, “Invariant-Based Verification of a Distributed Deadlock Detection Algorithm,” IEEE Trans. Software Eng., vol. 17, no. 8, pp. 789-799, Aug. 1991.
[23] A.D. Kshemkalyani and M. Singhal, “Correct Two-Phase and One-Phase Deadlock Detection Algorithms for Distributed Systems,” Proc. Second IEEE Symp. Parallel and Distributed Processing, pp. 126-129, Dec. 1990.
[24] D.A. Menasce and R.R. Muntz, “Locking and Deadlock Detection in Distributed Databases,” IEEE Trans. Software Eng., vol. 5, no. 3, pp. 195-202, 1979.
[25] R. Mukkamala, “Storage Efficient and Secure Replicated Distributed Databases,” IEEE Trans. Knowledge and Data Eng., vol. 6, no. 2, pp. 337-341, June 1994.
[26] M. Singhal, “Deadlock Detection in Distributed Systems,” Computer, pp. 37-47, Nov. 1989.
[27] G. Vossen and S.S. Wang, “Correct and Efficient Deadlock Detection and Resolution in Distributed Database Systems,” Proc. Fifth IEEE Int'l Conf. Data Eng., pp. 287-294, 1989.
[28] J. Wang, S. Huang, and N. Chen, “A Distributed Algorithm for Detecting Generalized Deadlocks,” technical report, Dept. of Computer Science, National Tsing-Hua Univ., 1990.
[29] C. Yeung and S. Hung, “A New Deadlock Detection Algorithm for Distributed Real-Time Database Systems,” Proc. 14th IEEE Int'l Symp. Reliable Distributed Systems, pp. 146-153, Sept. 1995.

Index Terms:
Distributed database, replicated database, quorum consensus, generalized deadlock, graph reduction.
Citation:
Ajay D. Kshemkalyani, Mukesh Singhal, "A One-Phase Algorithm to Detect Distributed Deadlocks in Replicated Databases," IEEE Transactions on Knowledge and Data Engineering, vol. 11, no. 6, pp. 880-895, Nov.-Dec. 1999, doi:10.1109/69.824601
Usage of this product signifies your acceptance of the Terms of Use.