Skip to main content

Atomic Boxes: Coordinated Exception Handling with Transactional Memory

  • Conference paper
ECOOP 2011 – Object-Oriented Programming (ECOOP 2011)

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

Included in the following conference series:

Abstract

In concurrent programs raising an exception in one thread does not prevent others from operating on an inconsistent shared state. Instead, exceptions should ideally be handled in coordination by all the threads that are affected by their cause.

In this paper, we propose a Java language extension for coordinated exception handling where a named abox (atomic box) is used to demarcate a region of code that must execute atomically and in isolation. Upon an exception raised inside an abox, threads executing in dependent aboxes, roll back their changes, and execute their recovery handler in coordination. We provide a dedicated compiler framework, CXH, to evaluate experimentally our atomic box construct. Our evaluation indicates that, in addition to enabling recovery, an atomic box executes a reasonably small region of code twice as fast as when using a failbox, the existing coordination alternative that has no recovery support.

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 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.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. Cabral, B., Marques, P.: Exception handling: A field study in Java and.NET. In: Ernst, E. (ed.) ECOOP 2007. LNCS, vol. 4609, pp. 151–175. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  2. Stelting, S.: Robust Java: Exception Handling, Testing and Debugging. Prentice Hall, New Jersey (2005)

    Google Scholar 

  3. Jacobs, B., Piessens, F.: Failboxes: Provably safe exception handling. In: Drossopoulou, S. (ed.) ECOOP 2009. LNCS, vol. 5653, pp. 470–494. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  4. Harris, T., Larus, J.R., Rajwar, R.: Transactional Memory, 2nd edn. Synthesis Lectures on Computer Architecture. Morgan & Claypool Publishers, San Francisco (2010)

    Google Scholar 

  5. Spector, A.Z., Daniels, D.S., Duchamp, D., Eppinger, J.L., Pausch, R.F.: Distributed transactions for reliable systems. In: SOSP, pp. 127–146 (1985)

    Google Scholar 

  6. Liskov, B.: Distributed programming in Argus. Commun. ACM 31, 300–312 (1988)

    Article  Google Scholar 

  7. Haines, N., Kindred, D., Morrisett, J.G., Nettles, S.M., Wing, J.M.: Composing first-class transactions. ACM Trans. Program. Lang. Syst. 16, 1719–1736 (1994)

    Article  Google Scholar 

  8. Jimenez-Peris, R., Patino-Martinez, M., Arevalo, S., Peris, R.J., Ballesteros, F., Carlos, J.: Translib: An Ada 95 object oriented framework for building transactional applications (2000)

    Google Scholar 

  9. Kienzle, J., Romanovsky, A.: Combining tasking and transactions, part II: Open multithreaded transactions. In: IRTAW 2000, pp. 67–74 (2001)

    Google Scholar 

  10. Xu, J., Randell, B., Romanovsky, A., Rubira, C.M.F., Stroud, R.J., Wu, Z.: Fault tolerance in concurrent object-oriented software through coordinated error recovery. In: FTCS, pp. 499–508 (1995)

    Google Scholar 

  11. Capozucca, A., Guelfi, N., Pelliccione, P., Romanovsky, A., Zorzo, A.F.: Frameworks for designing and implementing dependable systems using coordinated atomic actions: A comparative study. J. Syst. Softw. 82, 207–228 (2009)

    Article  Google Scholar 

  12. Beder, D.M., Randell, B., Romanovsky, A., Rubira, C.M.F.: On applying coordinated atomic actions and dependable software architectures for developing complex systems. In: ISORC, pp. 103 –112 (2001)

    Google Scholar 

  13. Zorzo, A.F., Stroud, R.J.: A distributed object-oriented framework for dependable multiparty interactions. In: OOPSLA, pp. 435–446 (1999)

    Google Scholar 

  14. Filho, F., Rubira, C.M.F.: Implementing coordinated error recovery for distributed object-oriented systems with AspectJ. J. of Universal Computer Science 10(7), 843–858 (2004)

    Google Scholar 

  15. Ziarek, L., Schatz, P., Jagannathan, S.: Stabilizers: A modular checkpointing abstraction for concurrent functional programs. In: ICFP, pp. 136–147 (2006)

    Google Scholar 

  16. Scherer III, W.N., Scott, M.L.: Advanced contention management for dynamic software transactional memory. In: PODC, pp. 240–248 (2005)

    Google Scholar 

  17. Guerraoui, R., Herlihy, M., Kapalka, M., Pochon, B.: Robust contention management in software transactional memory. In: SCOOL (2005)

    Google Scholar 

  18. Herlihy, M., Moss, J.E.B.: Transactional memory: Architectural support for lock-free data structures. In: ISCA, pp. 289–300 (1993)

    Google Scholar 

  19. Shavit, N., Touitou, D.: Software transactional memory. In: PODC, pp. 204–213 (1995)

    Google Scholar 

  20. Herlihy, M., Luchangco, V., Moir, M., Scherer III, W.N.: Software transactional memory for dynamic-sized data structures. In: PODC, pp. 92–101 (2003)

    Google Scholar 

  21. Harris, T., Fraser, K.: Language support for lightweight transactions. In: OOPSLA, pp. 388–402 (2003)

    Google Scholar 

  22. Dalessandro, L., Marathe, V., Spear, M., Scott, M.: Capabilities and limitations of library-based software transactional memory in C++. In: Transact (2007)

    Google Scholar 

  23. Dice, D., Shalev, O., Shavit, N.: Transactional locking II. In: Dolev, S. (ed.) DISC 2006. LNCS, vol. 4167, pp. 194–208. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  24. Riegel, T., Felber, P., Fetzer, C.: A lazy snapshot algorithm with eager validation. In: Dolev, S. (ed.) DISC 2006. LNCS, vol. 4167, pp. 284–298. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  25. Felber, P., Gramoli, V., Guerraoui, R.: Elastic transactions. In: Keidar, I. (ed.) DISC 2009. LNCS, vol. 5805, pp. 93–107. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  26. Shinnar, A., Tarditi, D., Plesko, M., Steensgaard, B.: Integrating support for undo with exception handling. Technical Report MSR-TR-2004-140, Microsoft Research (2004)

    Google Scholar 

  27. Cabral, B., Marques, P.: Implementing retry - featuring AOP. In: Fourth Latin-American Symposium on Dependable Computing, pp. 73–80 (2009)

    Google Scholar 

  28. Harris, T.: Exceptions and side-effects in atomic blocks. Sci. Comput. Program. 58(3), 325–343 (2005)

    Article  MATH  MathSciNet  Google Scholar 

  29. Harris, T., Marlow, S., Peyton-Jones, S., Herlihy, M.: Composable memory transactions. In: PPoPP, pp. 48–60 (2005)

    Google Scholar 

  30. Fetzer, C., Felber, P.: Improving program correctness with atomic exception handling. J. of Universal Computer Science 13(8), 1047–1072 (2007)

    Google Scholar 

  31. Volos, H., Tack, A.J., Goyal, N., Swift, M.M., Welc, A.: xCalls: Safe I/O in memory transactions. In: EuroSys, pp. 247–260 (2009)

    Google Scholar 

  32. Porter, D.E., Hofmann, O.S., Rossbach, C.J., Benn, A., Witchel, E.: Operating system transactions. In: SOSP, pp. 161–176 (2009)

    Google Scholar 

  33. Korland, G., Shavit, N., Felber, P.: Deuce: Noninvasive software transactional memory in Java. Transactions on HiPEAC 5(2) (2010)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2011 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Harmanci, D., Gramoli, V., Felber, P. (2011). Atomic Boxes: Coordinated Exception Handling with Transactional Memory. In: Mezini, M. (eds) ECOOP 2011 – Object-Oriented Programming. ECOOP 2011. Lecture Notes in Computer Science, vol 6813. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-22655-7_29

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-22655-7_29

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-22654-0

  • Online ISBN: 978-3-642-22655-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics