As-if-serial exception handling semantics for Java futures

Exception handling enables programmers to specify the behavior of a program when an exceptional event occurs at runtime. Exception handling, thus, facilitates software fault tolerance and the production of reliable and robust software systems. With the recent emergence of multi-processor systems and parallel programming constructs, techniques are needed that provide exception handling support in these environments that are intuitive and easy to use. Unfortunately, extant semantics of exception handling for concurrent settings is significantly more complex to reason about than their serial counterparts. In this paper, we investigate a similarly intuitive semantics for exception handling for the future parallel programming construct in Java. Futures are used by programmers to identify potentially asynchronous computations and to introduce parallelism into sequential programs. The intent of futures is to provide some performance benefits through the use of method-level concurrency while maintaining as-if-serial semantics that novice programmers can easily understand - the semantics of a program with futures is the same as that for an equivalent serial version of the program. We extend this model to provide as-if-serial exception handling semantics. Using this model our runtime delivers exceptions to the same point it would deliver them if the program was executed sequentially. We present the design and implementation of our approach and evaluate its efficiency using an open source Java virtual machine.

[1]  Flaviu Cristian,et al.  Exception Handling and Software Fault Tolerance , 1982, IEEE Transactions on Computers.

[3]  Bjarne Stroustrup,et al.  C++ Programming Language , 1986, IEEE Softw..

[4]  Brian Randell,et al.  System structure for software fault tolerance , 1975, IEEE Transactions on Software Engineering.

[5]  G. W. Hill ACM Algorithm 395: Student's t-distribution , 1970, CACM.

[6]  Vivek Sarkar,et al.  X10: an object-oriented approach to non-uniform cluster computing , 2005, OOPSLA '05.

[7]  Alan Snyder,et al.  Exception Handling in CLU , 1979, IEEE Transactions on Software Engineering.

[8]  Andrew S. Grimshaw,et al.  Easy-to-use object-oriented parallel processing with Mentat , 1993, Computer.

[9]  Valérie Issarny An exception handling model for parallel programming and its verification , 1991 .

[10]  Chandra Krintz,et al.  Language and Virtual Machine Support for Efficient Fine-Grained Futures in Java , 2007, 16th International Conference on Parallel Architecture and Compilation Techniques (PACT 2007).

[11]  Chandra Krintz,et al.  EFFICIENT SUPPORT OF FINE-GRAINED FUTURES IN JAVA , 2006 .

[12]  Victor Luchangco,et al.  The Fortress Language Specification Version 1.0 , 2007 .

[13]  Valérie Issarny An exception handling mechanism for parallel object-oriented programming , 1992 .

[14]  Suresh Jagannathan,et al.  Safe futures for Java , 2005, OOPSLA '05.

[15]  I-Ting Angelina Lee,et al.  The JCilk Multithreaded Language , 2005 .

[16]  Bjarne Stroustrup,et al.  The C++ programming language (2nd ed.) , 1991 .

[17]  Takaichi Yoshida,et al.  Concurrent exception handling in a distributed object-oriented computing environment , 2000, Proceedings Seventh International Conference on Parallel and Distributed Systems: Workshops.

[18]  Bradford L. Chamberlain,et al.  Parallel Programmability and the Chapel Language , 2007, Int. J. High Perform. Comput. Appl..

[19]  Bertrand Meyer,et al.  Eiffel: The Language , 1991 .

[20]  Doug Lea,et al.  A Java fork/join framework , 2000, JAVA '00.

[21]  James Gosling The Java Language Specification - Second Edition , 2000 .

[22]  John Danaher,et al.  The JCilk-1 runtime system , 2005 .

[23]  David A. Padua,et al.  Selected papers of the second workshop on Languages and compilers for parallel computing , 1990 .

[24]  Bradley C. Kuszmaul,et al.  Cilk: an efficient multithreaded runtime system , 1995, PPOPP '95.

[25]  Robert H. Halstead,et al.  MULTILISP: a language for concurrent symbolic computation , 1985, TOPL.

[26]  Matthew Arnold,et al.  Adaptive optimization in the Jalapeño JVM , 2000, OOPSLA '00.

[27]  Matthew Arnold,et al.  Adaptive optimization in the Jalapeno JVM , 2000, SIGP.

[28]  Stephen M. Blackburn,et al.  Barriers: friend or foe? , 2004, ISMM '04.

[29]  Guy L. Steele,et al.  Java Language Specification, Second Edition: The Java Series , 2000 .

[30]  Brian Randell,et al.  Process Structuring , 1973, CSUR.

[31]  Jie Xu,et al.  Exception handling and resolution in distributed object-oriented systems , 1996, Proceedings of 16th International Conference on Distributed Computing Systems.

[32]  Jie Xu,et al.  Coordinated exception handling in distributed object systems: from model to system implementation , 1998, Proceedings. 18th International Conference on Distributed Computing Systems (Cat. No.98CB36183).

[33]  Chandra Krintz,et al.  Supporting exception handling for futures in Java , 2007, PPPJ.

[34]  Valérie Issarny,et al.  An exception handling model for parallel programming and its verification , 1991, SIGSOFT '91.

[35]  Jason Maassen,et al.  Satin: Simple and Efficient Java-based Grid Programming , 2005, Scalable Comput. Pract. Exp..

[36]  T. von Eicken,et al.  Parallel programming in Split-C , 1993, Supercomputing '93.

[37]  Robert H. Halstead,et al.  Lazy task creation: a technique for increasing the granularity of parallel programs , 1990, LISP and Functional Programming.

[38]  David Callahan,et al.  A future-based parallel language for a general-purpose highly-parallel computer , 1990 .

[39]  Brian Randell,et al.  Error recovery in asynchronous systems , 1986, IEEE Transactions on Software Engineering.

[40]  Thomas M. Lahey,et al.  Fortran 90 programming , 1994 .

[41]  David B. Lomet,et al.  Process structuring, synchronization, and recovery using atomic actions , 1977, Language Design for Reliable Software.

[42]  Jie Xu,et al.  Concurrent Exception Handling and Resolution in Distributed Object Systems , 2000, IEEE Trans. Parallel Distributed Syst..

[43]  Mahesh K. Marina,et al.  Performance of route caching strategies in Dynamic Source Routing , 2001, Proceedings 21st International Conference on Distributed Computing Systems Workshops.

[44]  Matteo Frigo,et al.  The implementation of the Cilk-5 multithreaded language , 1998, PLDI.