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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
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)
Stelting, S.: Robust Java: Exception Handling, Testing and Debugging. Prentice Hall, New Jersey (2005)
Jacobs, B., Piessens, F.: Failboxes: Provably safe exception handling. In: Drossopoulou, S. (ed.) ECOOP 2009. LNCS, vol. 5653, pp. 470–494. Springer, Heidelberg (2009)
Harris, T., Larus, J.R., Rajwar, R.: Transactional Memory, 2nd edn. Synthesis Lectures on Computer Architecture. Morgan & Claypool Publishers, San Francisco (2010)
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)
Liskov, B.: Distributed programming in Argus. Commun. ACM 31, 300–312 (1988)
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)
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)
Kienzle, J., Romanovsky, A.: Combining tasking and transactions, part II: Open multithreaded transactions. In: IRTAW 2000, pp. 67–74 (2001)
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)
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)
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)
Zorzo, A.F., Stroud, R.J.: A distributed object-oriented framework for dependable multiparty interactions. In: OOPSLA, pp. 435–446 (1999)
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)
Ziarek, L., Schatz, P., Jagannathan, S.: Stabilizers: A modular checkpointing abstraction for concurrent functional programs. In: ICFP, pp. 136–147 (2006)
Scherer III, W.N., Scott, M.L.: Advanced contention management for dynamic software transactional memory. In: PODC, pp. 240–248 (2005)
Guerraoui, R., Herlihy, M., Kapalka, M., Pochon, B.: Robust contention management in software transactional memory. In: SCOOL (2005)
Herlihy, M., Moss, J.E.B.: Transactional memory: Architectural support for lock-free data structures. In: ISCA, pp. 289–300 (1993)
Shavit, N., Touitou, D.: Software transactional memory. In: PODC, pp. 204–213 (1995)
Herlihy, M., Luchangco, V., Moir, M., Scherer III, W.N.: Software transactional memory for dynamic-sized data structures. In: PODC, pp. 92–101 (2003)
Harris, T., Fraser, K.: Language support for lightweight transactions. In: OOPSLA, pp. 388–402 (2003)
Dalessandro, L., Marathe, V., Spear, M., Scott, M.: Capabilities and limitations of library-based software transactional memory in C++. In: Transact (2007)
Dice, D., Shalev, O., Shavit, N.: Transactional locking II. In: Dolev, S. (ed.) DISC 2006. LNCS, vol. 4167, pp. 194–208. Springer, Heidelberg (2006)
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)
Felber, P., Gramoli, V., Guerraoui, R.: Elastic transactions. In: Keidar, I. (ed.) DISC 2009. LNCS, vol. 5805, pp. 93–107. Springer, Heidelberg (2009)
Shinnar, A., Tarditi, D., Plesko, M., Steensgaard, B.: Integrating support for undo with exception handling. Technical Report MSR-TR-2004-140, Microsoft Research (2004)
Cabral, B., Marques, P.: Implementing retry - featuring AOP. In: Fourth Latin-American Symposium on Dependable Computing, pp. 73–80 (2009)
Harris, T.: Exceptions and side-effects in atomic blocks. Sci. Comput. Program. 58(3), 325–343 (2005)
Harris, T., Marlow, S., Peyton-Jones, S., Herlihy, M.: Composable memory transactions. In: PPoPP, pp. 48–60 (2005)
Fetzer, C., Felber, P.: Improving program correctness with atomic exception handling. J. of Universal Computer Science 13(8), 1047–1072 (2007)
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)
Porter, D.E., Hofmann, O.S., Rossbach, C.J., Benn, A., Witchel, E.: Operating system transactions. In: SOSP, pp. 161–176 (2009)
Korland, G., Shavit, N., Felber, P.: Deuce: Noninvasive software transactional memory in Java. Transactions on HiPEAC 5(2) (2010)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)