๐”– Bobbio Scriptorium
โœฆ   LIBER   โœฆ

Programming with exceptions in JCilk

โœ Scribed by John S. Danaher; I.-Ting Angelina Lee; Charles E. Leiserson


Book ID
104091924
Publisher
Elsevier Science
Year
2006
Tongue
English
Weight
553 KB
Volume
63
Category
Article
ISSN
0167-6423

No coin nor oath required. For personal study only.

โœฆ Synopsis


JCilk extends the serial subset of the Java language by importing the fork-join primitives spawn and sync from the Cilk multithreaded language, thereby providing call-return semantics for multithreaded subcomputations. In addition, JCilk transparently integrates Java's exception handling with multithreading by extending the semantics of Java's try and catch constructs, but without adding new keywords. This extension is "faithful" in that it obeys Java's ordinary serial semantics when executed on a single processor. When executed in parallel, however, an exception thrown by a JCilk computation causes its sibling computations to abort, which yields a clean semantics in which the enclosing cilk try block need only handle a single exception.

The exception semantics of JCilk allows programs with speculative computations to be programmed easily. Speculation is essential in order to parallelize programs such as branch-and-bound or heuristic search. We show how JCilk's linguistic mechanisms can be used to program the "queens" puzzle and a parallel alpha-beta search. We have implemented JCilk's semantic model in a prototype compiler and runtime system, called JCilk-1. The compiler implements continuations in a novel fashion by introducing goto statements into Java. The JCilk-1 runtime system shadows the dynamic hierarchy of cilk try blocks using a "try tree", allowing the system to chase down side computations that must be aborted. Performance studies indicate that JCilk's exception mechanism incurs minimal overhead, contributing at most a few percent on top of the cost for a spawn/return.


๐Ÿ“œ SIMILAR VOLUMES


Logic programs with exceptions
โœ Robert A. Kowalski; Fariba Sadri ๐Ÿ“‚ Article ๐Ÿ“… 1991 ๐Ÿ› Springer ๐ŸŒ English โš– 590 KB
Constructing a program with exceptions
โœ K. Rustan; M. Leino ๐Ÿ“‚ Article ๐Ÿ“… 1995 ๐Ÿ› Elsevier Science ๐ŸŒ English โš– 395 KB
Exception handling in C programs
โœ P. A. Lee ๐Ÿ“‚ Article ๐Ÿ“… 1983 ๐Ÿ› John Wiley and Sons ๐ŸŒ English โš– 911 KB