Advertisement

Deadlock Analysis of Wait-Notify Coordination

  • Cosimo Laneve
  • Luca PadovaniEmail author
Chapter
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11760)

Abstract

Deadlock analysis of concurrent programs that contain coordination primitives (wait, notify and Open image in new window ) is notoriously challenging. Not only these primitives affect the scheduling of processes, but also notifications unmatched by a corresponding wait are silently lost. We design a behavioral type system for a core calculus featuring shared objects and Java-like coordination primitives. The type system is based on a simple language of object protocols – called usages – to determine whether objects are used reliably, so as to guarantee deadlock freedom.

References

  1. 1.
    Agarwal, R., Stoller, S.D.: Run-time detection of potential deadlocks for programs with locks, semaphores, and condition variables. In: Proceedings of PADTAD 2006, pp. 51–60. ACM (2006).  https://doi.org/10.1145/1147403.1147413
  2. 2.
    Busi, N.: Analysis issues in petri nets with inhibitor arcs. Theor. Comput. Sci. 275(1–2), 127–177 (2002).  https://doi.org/10.1016/S0304-3975(01)00127-XMathSciNetCrossRefzbMATHGoogle Scholar
  3. 3.
    Caires, L., Pfenning, F., Toninho, B.: Linear logic propositions as session types. Math. Struct. Comput. Sci. 26(3), 367–423 (2016).  https://doi.org/10.1017/S0960129514000218MathSciNetCrossRefzbMATHGoogle Scholar
  4. 4.
    Demartini, C., Iosif, R., Sisto, R.: A deadlock detection tool for concurrent java programs. Softw. Pract. Exper. 29(7), 577–603 (1999)CrossRefGoogle Scholar
  5. 5.
    Deshmukh, J.V., Emerson, E.A., Sankaranarayanan, S.: Symbolic modular deadlock analysis. Autom. Softw. Eng. 18(3–4), 325–362 (2011)CrossRefGoogle Scholar
  6. 6.
    Eslamimehr, M., Palsberg, J.: Sherlock: scalable deadlock detection for concurrent programs. In: Proceedings of FSE 2014, pp. 353–365. ACM (2014)Google Scholar
  7. 7.
    Girard, J.: Linear logic. Theor. Comput. Sci. 50, 1–102 (1987).  https://doi.org/10.1016/0304-3975(87)90045-4MathSciNetCrossRefzbMATHGoogle Scholar
  8. 8.
    Hamin, J., Jacobs, B.: Deadlock-free monitors. In: Ahmed, A. (ed.) ESOP 2018. LNCS, vol. 10801, pp. 415–441. Springer, Cham (2018).  https://doi.org/10.1007/978-3-319-89884-1_15CrossRefGoogle Scholar
  9. 9.
    Havelund, K.: Using runtime analysis to guide model checking of Java programs. In: Havelund, K., Penix, J., Visser, W. (eds.) SPIN 2000. LNCS, vol. 1885, pp. 245–264. Springer, Heidelberg (2000).  https://doi.org/10.1007/10722468_15CrossRefzbMATHGoogle Scholar
  10. 10.
    Hoare, C.A.R.: Monitors: an operating system structuring concept. Commun. ACM 17(10), 549–557 (1974).  https://doi.org/10.1145/355620.361161CrossRefzbMATHGoogle Scholar
  11. 11.
    Joshi, P., Naik, M., Sen, K., Gay, D.: An effective dynamic analysis for detecting generalized deadlocks. In: Proceedings of FSE 2010, pp. 327–336. ACM (2010).  https://doi.org/10.1145/1882291.1882339
  12. 12.
    Kobayashi, N.: Type-based information flow analysis for the pi-calculus. Acta Informatica 42(4–5), 291–347 (2005).  https://doi.org/10.1007/s00236-005-0179-xMathSciNetCrossRefzbMATHGoogle Scholar
  13. 13.
    Kobayashi, N., Laneve, C.: Deadlock analysis of unbounded process networks. Inf. Comput. 252, 48–70 (2017).  https://doi.org/10.1016/j.ic.2016.03.004MathSciNetCrossRefzbMATHGoogle Scholar
  14. 14.
    Laneve, C.: A lightweight deadlock analysis for programs with threads and reentrant locks. In: Havelund, K., Peleska, J., Roscoe, B., de Vink, E. (eds.) FM 2018. LNCS, vol. 10951, pp. 608–624. Springer, Cham (2018).  https://doi.org/10.1007/978-3-319-95582-7_36CrossRefGoogle Scholar
  15. 15.
    Laneve, C., Padovani, L.: Deadlock analysis of wait-notify coordination. Technical report, Computer Science Department, University of Bologna (2019). https://hal.inria.fr/hal-02166082
  16. 16.
    Naik, M., Park, C., Sen, K., Gay, D.: Effective static deadlock detection. In: Proceedings of ICSE 2009, pp. 386–396. IEEE (2009).  https://doi.org/10.1109/ICSE.2009.5070538
  17. 17.
    von Praun, C.: Detecting synchronization defects in multi-threaded object-oriented programs. Ph.D. thesis, Swiss Federal Institute of Technology, Zurich (2004)Google Scholar
  18. 18.
    Wadler, P.: Propositions as sessions. J. Funct. Program. 24(2–3), 384–418 (2014).  https://doi.org/10.1017/S095679681400001XMathSciNetCrossRefzbMATHGoogle Scholar
  19. 19.
    Williams, A., Thies, W., Ernst, M.D.: Static deadlock detection for Java libraries. In: Black, A.P. (ed.) ECOOP 2005. LNCS, vol. 3586, pp. 602–629. Springer, Heidelberg (2005).  https://doi.org/10.1007/11531142_26CrossRefGoogle Scholar

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  1. 1.Department of Computer Science and EngineeringUniversity of Bologna – Inria FocusBolognaItaly
  2. 2.Dipartimento di InformaticaUniversità di TorinoTurinItaly

Personalised recommendations