skip to main content
article
Free access

Deadlock detection in distributed databases

Published: 01 December 1987 Publication History

Abstract

The problem of deadlock detection in distributed systems has undergone extensive study. An important application relates to distributed database systems. A uniform model in which published algorithms can be cast is given, and the fundamental principles on which distributed deadlock detection schemes are based are presented. These principles represent mechanisms for developing distributed algorithms in general and deadlock detection schemes in particular. In addition, a hierarchy of deadlock models is presented; each model is characterized by the restrictions that are imposed upon the form resource requests can assume. The hierarchy includes the well-known models of resource and communication deadlock. Algorithms are classified according to both the underlying principles and the generality of resource requests they permit. A number of algorithms are discussed in detail, and their complexity in terms of the number of messages employed is compared. The point is made that correctness proofs for such algorithms using operational arguments are cumbersome and error prone and, therefore, that only completely formal proofs are sufficient for demonstrating correctness.

References

[1]
AWERBUCH, B., AND MICALI, S. 1986. Dynamic deadlock resolution protocols, in Proceedings of the Foundations of Computer Science (Toronto, Canada). IEEE, New York, pp. 196-207.
[2]
BERNSTEIN, P. A., HADZILACOS, V., AND GOODMAN, N. 1987. Concurrency Control and Recovery in Database Systems. Addison Wesley, Reading, Mass.
[3]
BRACHA, G., AND TOUEG, S. 1983. A distributed algorithm for generalized deadlock detection. Tech. Rep. TR 83-558, Cornell Univ., Ithaca, N.Y.
[4]
BRACHA, G., AND TOUEG, $. 1984. A distributed algorithm for generalized deadlock detection. In Proceedings of the A CM Symposium on Principles of Distributed Computing (Vancouver, Canada, Aug.). ACM, New York, pp. 285-301.
[5]
CHANDY, K. M., AND LAMPORT, L. 1985. Distributed snapshots: Determining global states of distributed systems. A CM Trans. Program. Lang. Syst. 3, i (Feb.), 63-75.
[6]
CHANDY, K. M., AND MISRA, J. 1982. A distributed algorithm for detecting resource deadlocks in distributed systems. In Proceedings of the A CM Symposium on Principles of Distributed Computing (Ottawa, Canada, Aug.). ACM, New York, pp. 157-164.
[7]
CHANDY, K. M., AND MISRA, J. 1986. An example of stepwise refinement of distributed programs: Quiescence detection. A CM Trans. Program. Lang. Syst. 8, 3 (July), 326-343.
[8]
CHANDY, K. M., MISRA, J., AND HAAS, L. M. 1983. Distributed deadlock detection. A CM Trans. Comput. Syst. 1, 2 (May), 144-156.
[9]
CHANG, E. 1982. Echo algorithms: Depth parallel operations on general graphs. IEEE Trans. Softw. Eng. SE-8, 4 (July), 391-401.
[10]
DIJKSTRA, E. W., AND SCHOLTEN, C. S. 1980. Termination detection for diffusing computations. In{. Process. Lett. 11, I (Aug.).
[11]
DIJKSTRA, E. W., FEIJEN, W., AND VAN GASTEREN, A. J. M. 1983. Derivation of a termination detection algorithm for distributed computations. Inf. Process. Lett. 16, 5 (June), 217-219.
[12]
ELMAGARMID, A. K. 1985. Deadlock detection and resolution in distributed processing systems. Ph.D. dissertation, Dept. of Electrical Engineering, Ohio State Univ., Columbus, Ohio.
[13]
ELMAGARMID, A. K. 1986. A survey of distributed deadlock detection algorithms. A CM SIGMOD Rec. 15, 3 (Sept.).
[14]
GAFNI, E. 1986. Perspectives on distributed network protocols: A case for building blocks. In IEEE Military Communications Conference (Monterey, Calif.). IEEE, New York, pp. 1.1.1-1.1.5.
[15]
GIFFORO, D. G. 1979. Weighted voting for replicated data. In Proceedings of the 7th ACM Symposium on Operating Systems Principles (Pacific Grove, Calif., Dec.). ACM, New York, pp. 150-163.
[16]
GLIGOR, V., AND SHATTUCK, S. 1980. On deadlock detection in distributed databases. IEEE Trans. Softw. Eng. SE-6, 5 (Sept.).
[17]
GRAY, J. N., HOMAN, P., KORTH, H. F., AND OBER- MARCK, R. L. 1981. A straw man analysis of the probability of waiting and deadlock in a database system. Tech. Rep. RJ 3066, IBM Research Laboratory, San Jose, Calif.
[18]
HAAS, L. M. 1981. Two approaches to deadlock detection in distributed systems. Ph.D. dissertation, Dept. of Computer Sciences, Univ. of Texas, Austin, Tex.
[19]
HAAS, L. M., AND MOHAN, C. 1983. A distributed deadlock detection algorithm for a resource-based system. Res. Rep. RJ 3765, IBM Research Laboratory, San Jose, Calif.
[20]
H~LARY, J., JARD, C., PLOUZEAU, N., AND RAYNAL, M. 1987. Detection of stable properties in distributed applications. In Proceedings of the A CM Symposium on Principles of Distributed Computing (Vancouver, Canada, Aug.). ACM, New York, pp. 125-136.
[21]
HERMANN, T., AND CHANDY, K. M. 1983. A distributed procedure to detect AND/OR deadlock. Tech. Rep. TR LCS-8301, Dept. of Computer Sciences, Univ. of Texas, Austin, Tex.
[22]
HO, G. S., AND RAMAMOORTHY, C. V. 1982. Protocols for deadlock detection in distributed database systems. IEEE Trans. So{tw. Eng. SE- 8, 6 (Nov.), 554-557.
[23]
HOLT, R. C. 1972. Some deadlock properties on computer systems. ACM Comput. Surv. 4, 3 (Sept.), 179-196.
[24]
JAGANNATHAN, J. R., AND VASUDEVAN, R. 1982. A distributed deadlock detection and resolution scheme; performance study. In Proceedings of the Third International Conference on Distributed Computing Systems (Miami, Fla.). IEEE, New York, pp. 496-501.
[25]
LAMPORT, L. 1978. Time, clocks, and the ordering of events in distributed systems. Commun. ACM 21, 7 (July), 558-565.
[26]
MENASCE, D., AND MUNTZ, R. 1979. Locking and deadlock detection in distributed databases. IEEE Trans. So{tw. Eng. SE-5, 3 (May).
[27]
MISRA, J. 1983. Detecting termination of distributed computations using markers. In Proceedings of the ACM Symposium on Principles of Distributed Computing (Montreal, Canada, Aug.). ACM, New York, pp. 290-294.
[28]
MISRA, J., AND CHANDY, K. M. 1982a. A distributed graph algorithm: Knot detection. A CM Trans. Program. Lang. Syst. 4, 4 (Oct.), 678-686.
[29]
MISRA, J., AND CHANDY, K. M. 1982b. Termination detection of diffusing computations in communicating sequential processes. A CM Trans. Program. Lang. Syst. 4, i (Jan.), 37-43.
[30]
MITCHELL, D. P., AND MERRITT, M. J. 1984. A distributed algorithm for deadlock detection and resolution. In Proceedings of the A CM Symposium on Principles o{ Distributed Computing. ACM, New York, pp. 282-284.
[31]
NATARAJAN, N. 1986. A distributed scheme for detecting communication deadlock. IEEE Trans. So{tw. Eng. SE-12, 4 (Apr.), 531-537.
[32]
OBERMARCK, R. 1980. Deadlock detection for all resource classes. Res. Rep. RJ2955, IBM Research Laboratory, San Jose, Calif.
[33]
OBERMARCK, R. 1982. Distributed deadlock detection algorithm. ACM Trans. Database Syst. 7, 2 (June), 187-208.
[34]
PAPADIMITRIOU, C. 1987. The Theory of Database Concurrency Control. Computer Science Press, Rockville, Md.
[35]
R~UCHLE, T., AND TOUEG, S. 1983. Exposure to deadlock for communicating processes is hard to detect. Tech. Rep. TR 83-555, Cornell Univ., Ithaca, N.Y.
[36]
SINHA, M. K., AND NATARAJAN, N. 1984. A distributed deadlock detection algorithm based on timestamps. In Proceedings of the 4th International Con{erence on Distributed Computing Systerns. IEEE, New York, pp. 546-556.
[37]
ZOBEL, D. 1983. The deadlock problem: A classifying bibliography. Operat. Syst. Rev. 17, 2 (Oct.), 6-15.
[38]
BADAL, D. Z., AND GEHL, M. T. 1983. On deadlock detection in distributed computing systems. In IEEE INFOCOM. IEEE, New York.
[39]
BRACHA, G. 1985. Randomized agreement protocols and distributed deadlock detection algorithms. Ph.D. dissertation, Cornell Univ., Ithaca, N.Y.
[40]
COHEN, S., AND LEHMANN, D. 1982. Dynamic systems and their distributed termination. In Proceedings of the A CM Symposium on Principles of Distributed Computing (Ottawa, Canada, Aug.). ACM, New York, pp. 29-33.
[41]
DIJKSTRA, E. W. 1982. Distributed termination detection revisited. EWD 828, Plataanstraat 5, 5671 A1 Nuenen, The Netherlands.
[42]
FRANCEZ, N. 1980. Distributed termination. A CM Trans. Program. Lang. Syst. 2, 1 (Jan.), 42-55.
[43]
FRANCEZ, N., AND RODEH, M. 1982. Achieving distributed termination without freezing. IEEE Trans. Softw. Eng. SE-8, 3 (May), 287-292.
[44]
FRANCEZ, N., RODEH, M., AND SINTZOFF, M. 1981. Distributed termination with interval assertions. In Proceedings of Formalization of Programming Concepts (Peninsula, Spain). Springer Verlag, New York.
[45]
GOLDMAN, B. 1985. Deadlock detection in computer networks. Tech. Rep. LCS TR-185, Massachusetts Institute of Technology, Cambridge, Mass.
[46]
GOUDA, M. 1981. Distributed state exploration for protocol validation. Tech. Rep. TR-185, Dept. of Computer Sciences, Univ. of Texas, Austin, Tex.
[47]
ISLOOR, S. S., AND MARSLAND, T. A. 1980. The deadlock problem: An overview. Computer (Sept.), 58-70.
[48]
JAGANNATHAN, J. R., AND VASUDEVAN, R. 1982. Detection and resolution of deadlocks in distributed systems. Tech. Rep. 82-108-27, Univ. of Calgary, Calgary, Alta., Canada.
[49]
KORTH, H. F., KRISHNAMURTHY, R., NIGAM, A., AND ROBINSON, J. T. 1983. A framework for understanding distributed (deadlock detection) algorithms. In Proceedings of the Second A CM Symposium on Principles of Database Systems (Atlanta, Ga., Mar.). ACM, New York, pp. 192-201.
[50]
MARSLAND, T. A., AND ISLOOR, S. S. 1980. Detection of deadlocks in distributed database systems. INFOR 18, i (Feb.), 1-20.
[51]
TSAI, W. 1982. Distributed deadlock detection in distributed database systems. Ph.D. dissertation, Univ. of Illinois at Urbana-Champaign, Urbana, Ill.
[52]
TSAI, W., AND BELFORD, G. 1982. Detecting deadlock in distributed systems. In IEEE INFOCOM. IEEE, New York, pp. 89-95.
[53]
WUU, G. T., AND BERNSTEIN, A. J. 1985. False deadlock detection in distributed systems. IEEE Trans. Softw. Eng. SE-11, 8 (Aug.), 820-821.

Cited By

View all
  • (2023)Offline Time-Independent Multiagent Path PlanningIEEE Transactions on Robotics10.1109/TRO.2023.325869039:4(2720-2737)Online publication date: 1-Aug-2023
  • (2023)LCL: A Lock Chain Length-based Distributed Algorithm for Deadlock Detection and Resolution2023 IEEE 39th International Conference on Data Engineering (ICDE)10.1109/ICDE55515.2023.00019(151-163)Online publication date: Apr-2023
  • (2023)An Approach to New Technical Solutions in Resource Allocation Based on Artificial IntelligenceIntelligent Systems and Machine Learning10.1007/978-3-031-35081-8_27(325-334)Online publication date: 10-Jul-2023
  • Show More Cited By

Recommendations

Reviews

Gerard J. Holzmann

This readable and instructive paper focuses on algorithms for deadlock detection, rather than deadlock prevention or resolution. Knapp begins by formulating a general model for resource allocation in distributed systems, distinguishing between six different models of increasing generality. In the simplest model, any process within the system may request and monopolize no more than one resource at a time, while in the most general model, all possible variants of overlapping requests for multiple resources are permitted. The types of deadlock that can result in each type of system are different, and the complexity of the required deadlock detection algorithms also differs. Knapp classifies deadlock detection algorithms into four main types: (1) path-pushing algorithms, (2) edge-chasing algorithms, (3) diffusing computations, and (4) global state detection algorithms. In a path-pushing algorithm, for instance, the processes exchange complete information about the resources they are waiting for. Each process is then able to construct a wait-for-graph of the system as a whole and detect the deadlock configurations. Knapp writes: “One noteworthy point about path-pushing algorithms is that many of them were found to be incorrect, either by not detecting true deadlocks, by discovering phantom deadlocks, or both.” Knapp gives a sufficient number of examples of published and “proved” algorithms to validate his claim. In an edge-chasing algorithm, the processes can issue special messages called probes. A probe message is forwarded to all processes that the receiving process waits for. A deadlock can be declared if a probe message makes its way back to the originating process. As an example of a simple and well-designed algorithm of this type, the author discusses in some detail the work of Mitchell and Merritt [1]. Their algorithm has the added advantage that the proofs of correctness are elegant and, says Knapp, “fun to read (and write).” The last two types of algorithms, diffusing computations and global state detection, are based on early work by Dijkstra and Lamport, respectively. Knapp gives detailed motivations and examples of each type of algorithm. One of Knapp's conclusions is particularly worth quoting: “The large number of errors in published algorithms addressing the problem of distributed deadlock detection . . . shows that only rigorous proofs, using as little operational argumentation as possible, suffice to show the correctness of these algorithms.” Some of these errors have escaped notice for many years. This paper is a laudable attempt to set the record straight.

Access critical reviews of Computing literature here

Become a reviewer for Computing Reviews.

Comments

Information & Contributors

Information

Published In

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 December 1987
Published in�CSUR�Volume 19, Issue 4

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)487
  • Downloads (Last 6 weeks)69
Reflects downloads up to 16 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2023)Offline Time-Independent Multiagent Path PlanningIEEE Transactions on Robotics10.1109/TRO.2023.325869039:4(2720-2737)Online publication date: 1-Aug-2023
  • (2023)LCL: A Lock Chain Length-based Distributed Algorithm for Deadlock Detection and Resolution2023 IEEE 39th International Conference on Data Engineering (ICDE)10.1109/ICDE55515.2023.00019(151-163)Online publication date: Apr-2023
  • (2023)An Approach to New Technical Solutions in Resource Allocation Based on Artificial IntelligenceIntelligent Systems and Machine Learning10.1007/978-3-031-35081-8_27(325-334)Online publication date: 10-Jul-2023
  • (2022)60 Years of Databases (part three)PROBLEMS IN PROGRAMMING10.15407/pp2022.01.034(034-066)Online publication date: Mar-2022
  • (2022)An incremental approach for detecting distributed deadlocks in the generalized modelComputing10.1007/s00607-021-00904-2104:1(149-168)Online publication date: 1-Jan-2022
  • (2021)Blockchain-Based Digital Rights Management TechniquesLarge-Scale Data Streaming, Processing, and Blockchain Security10.4018/978-1-7998-3444-1.ch008(168-180)Online publication date: 2021
  • (2020)Highly-scalable traffic management of autonomous industrial transportation systemsRobotics and Computer-Integrated Manufacturing10.1016/j.rcim.2019.10191563:COnline publication date: 1-Jun-2020
  • (2020)Technical Solutions to Build Technology Infrastructure for Applications in Smart Agricultural ModelsIntelligent Computing in Engineering10.1007/978-981-15-2780-7_21(171-176)Online publication date: 10-Apr-2020
  • (2019)Related Work on Deadlock and Termination Detection TechniquesIntegrated Model of Distributed Systems10.1007/978-3-030-12835-7_2(17-29)Online publication date: 17-Mar-2019
  • (2018)Dynamic Deadlock Verification for General Barrier SynchronisationACM Transactions on Programming Languages and Systems10.1145/322906041:1(1-38)Online publication date: 11-Dec-2018
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Full Access

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media