A Scalable, Sound, Eventually-Complete Algorithm for Deadlock Immunity

We introduce the concept of deadlock immunity --a program's ability to avoid all deadlocks that match patterns of deadlocks experienced in the past. We present here an algorithm for enabling large software systems to automatically acquire such immunity without any programmer assistance. We prove that the algorithm is sound and complete with respect to the immunity property. We implemented the algorithm as a tool for Java programs, and measurements show it introduces only modest performance overhead in real, large applications like JBoss. Deadlock immunity is as useful as complete freedom from deadlocks in many practical cases, so we see the present algorithm as a pragmatic step toward ridding complex concurrent programs of their deadlocks.

[1]  Maurice Herlihy,et al.  Transactional Memory: Architectural Support For Lock-free Data Structures , 1993, Proceedings of the 20th Annual International Symposium on Computer Architecture.

[2]  Donald E. Knuth,et al.  The art of computer programming, volume 3: (2nd ed.) sorting and searching , 1998 .

[3]  Greg Nelson,et al.  Extended static checking for Java , 2002, PLDI '02.

[4]  Dinghao Wu,et al.  KISS: keep it simple and sequential , 2004, PLDI '04.

[5]  Donald Ervin Knuth,et al.  The Art of Computer Programming , 1968 .

[6]  E. W. Beth,et al.  Proof by Contradiction , 1970 .

[7]  Dawson R. Engler,et al.  RacerX: effective, static detection of race conditions and deadlocks , 2003, SOSP '03.

[8]  Michael D. Ernst,et al.  Static Deadlock Detection for Java Libraries , 2005, ECOOP.

[9]  Tong Li,et al.  Pulse: A Dynamic Deadlock Detection Mechanism Using Speculative Execution , 2005, USENIX Annual Technical Conference, General Track.

[10]  Martin C. Rinard,et al.  ACM Conference on Object-Oriented Programming, Systems, Languages and Applications (OOPSLA), November 2002 Ownership Types for Safe Programming: Preventing Data Races and Deadlocks , 2022 .

[11]  A. Nico Habermann,et al.  Prevention of system deadlocks , 1969, CACM.

[12]  Vicent Cholvi,et al.  A Transformation to Provide Deadlock-Free Programs , 2003, International Conference on Computational Science.

[13]  Mukesh Singhal,et al.  Deadlock detection in distributed systems , 1989, Computer.

[14]  Ference Belik An Efficient Deadlock Avoidance Rechnique , 1990, IEEE Trans. Computers.

[15]  Butler W. Lampson,et al.  Experience with processes and monitors in Mesa , 1980, CACM.

[16]  Mahesh Viswanathan,et al.  Java-MaC: A Run-Time Assurance Approach for Java Programs , 2004, Formal Methods Syst. Des..

[17]  Marvin V. Zelkowitz,et al.  Programming Languages: Design and Implementation , 1975 .

[18]  C. A. R. Hoare,et al.  Monitors: an operating system structuring concept , 1974, CACM.

[19]  Donald E. Knuth,et al.  The Art of Computer Programming: Volume 3: Sorting and Searching , 1998 .

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