Skip to main content

A Modular Scheme for Deadlock Prevention in an Object-Oriented Programming Model

  • Conference paper
Formal Methods and Software Engineering (ICFEM 2010)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 6447))

Included in the following conference series:

Abstract

Despite the advancements of concurrency theory in the past decades, practical concurrent programming has remained a challenging activity. Fundamental problems such as data races and deadlocks still persist for programmers since available detection and prevention tools are unsound or have otherwise not been well adopted. In an alternative approach, programming models that exclude certain classes of errors by design can address concurrency problems at a language level. In this paper we review SCOOP, an existing race-free programming model for concurrent object-oriented programming, and extend it with a scheme for deadlock prevention based on locking orders. The scheme facilitates modular reasoning about deadlocks by associating annotations with the interfaces of routines. We prove deadlock-freedom of well-formed programs using a rigorous formalization of the locking semantics of the programming model. The scheme has been implemented and we demonstrate its usefulness by applying it to the example of a simple web server.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Bacon, D.F., Strom, R.E., Tarafdar, A.: Guava: a dialect of Java without data races. In: Proc. OOPSLA 2000, pp. 382–400. ACM, New York (2000)

    Google Scholar 

  2. Bensalem, S., Fernandez, J., Havelund, K., Mounier, L.: Confirmation of deadlock potentials detected by runtime analysis. In: PADTAD 2006, pp. 41–50. ACM, New York (2006)

    Google Scholar 

  3. Boyapati, C., Lee, R., Rinard, M.: Ownership types for safe programming: preventing data races and deadlocks. In: Proc. OOPSLA 2002, pp. 211–230. ACM, New York (2002)

    Google Scholar 

  4. Clarke, D.G., Potter, J.M., Noble, J.: Ownership types for flexible alias protection. ACM SIGPLAN Notices 33(10), 48–64 (1998)

    Article  MATH  Google Scholar 

  5. Coffman, E.G., Elphick, M., Shoshani, A.: System deadlocks. ACM Computing Surveys 3(2), 67–78 (1971)

    Article  MATH  Google Scholar 

  6. Detlefs, D.L., Leino, R., Nelson, G., Saxe, J.B.: Extended static checking. Technical Report 159, Compaq SRC (1998)

    Google Scholar 

  7. Flanagan, C., Leino, R., Lillibridge, M., Nelson, G., Saxe, J.B., Stata, R.: Extended static checking for Java. In: Proc. PLDI 2002, pp. 234–245. ACM, New York (2002)

    Google Scholar 

  8. Hoare, C.A.R.: Monitors: an operating system structuring concept. Communications of the ACM 17(10), 549–557 (1974)

    Article  MATH  Google Scholar 

  9. SCOOP homepage (2010), http://scoop.origo.ethz.ch/

  10. Jacobs, B., Smans, J., Piessens, F., Schulte, W.: A statically verifiable programming model for concurrent object-oriented programs. In: Liu, Z., He, J. (eds.) ICFEM 2006. LNCS, vol. 4260, pp. 420–439. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  11. Kerfoot, E., McKeever, S., Torshizi, F.: Deadlock freedom through object ownership. In: Proc. IWACO 2009, pp. 1–8. ACM, New York (2009)

    Google Scholar 

  12. Kobayashi, N.: A new type system for deadlock-free processes. In: Baier, C., Hermanns, H. (eds.) CONCUR 2006. LNCS, vol. 4137, pp. 233–247. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  13. Korty, J.A.: Sema: A lint-like tool for analyzing semaphore usage in a multithreaded UNIX kernel. In: USENIX Winter Technical Conference (1989)

    Google Scholar 

  14. Lavender, R.G., Schmidt, D.C.: Active object: an object behavioral pattern for concurrent programming. In: Pattern Languages of Program Design, pp. 483–499. Addison-Wesley, Reading (1996)

    Google Scholar 

  15. Meyer, B.: Object-Oriented Software Construction, 2nd edn. Prentice-Hall, Englewood Cliffs (1997)

    MATH  Google Scholar 

  16. Nienaltowski, P.: Practical framework for contract-based concurrent object-oriented programming. PhD thesis, ETH Zurich (2007)

    Google Scholar 

  17. Ostroff, J.S., Torshizi, F., Huang, H.F., Schoeller, B.: Beyond contracts for concurrency. Formal Aspects of Computing 21(4), 319–346 (2009)

    Article  MATH  Google Scholar 

  18. Savage, S., Burrows, M., Nelson, G., Sobalvarro, P., Anderson, T.: Eraser: a dynamic data race detector for multithreaded programs. ACM Transactions on Computer Systems 15(4), 391–411 (1997)

    Article  Google Scholar 

  19. Torshizi, F., Ostroff, J.S., Paige, R.F., Chechik, M.: The SCOOP concurrency model in Java-like languages. In: Proc. CPA 2009. IOS Press, Amsterdam (2009)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2010 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

West, S., Nanz, S., Meyer, B. (2010). A Modular Scheme for Deadlock Prevention in an Object-Oriented Programming Model. In: Dong, J.S., Zhu, H. (eds) Formal Methods and Software Engineering. ICFEM 2010. Lecture Notes in Computer Science, vol 6447. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-16901-4_39

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-16901-4_39

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-16900-7

  • Online ISBN: 978-3-642-16901-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics