UTCS Colloquium: Angelina Lee/MIT Programming with Exceptions in JCilk ACES 6.304 Tuesday May 8 2007 %40 10:00 a.m.

Contact Name: 
Jenna Whitney
Date: 
May 8, 2007 10:00am - 11:00am

Type of Talk: UTCS Colloquium

Speaker Name

/Affiliation: Angelina Lee/MIT

Date: Tuesday May 8 2007 10:00 a

.m.

Location (other): ACES 6.304

Host: Kathryn McKinley & K

eshav Pingali

Talk Title: Programming with Exceptions in JCilk
<

br>Talk Abstract:
JCilk extends the Java language to provide call-return
semantics
for multithreading much as Cilk does for C. Java''s built-

in
thread model does not support the passing of exceptions
or retur

n values from one thread back to the parent thread
that created it. JC

ilk imports Cilk''s fork-join primitives
spawn and sync into Java to pr

ovide procedure-call semantics
for concurrent subcomputations. In this
talk I show JCilk
integrates exception handling with multithreading b

y defining
semantics consistent with the existing semantics of Java''s

try and catch constructs but which handle concurrency in
spawned m

ethods.

JCilk''s strategy of integrating multithreading with Java''s

exception semantics yields some surprising semantic synergies.
In

particular JCilk extends Java''s exception semantics to allow
exceptio

ns to be passed from a spawned method to its parent
in a natural way th

at obviates the need for Cilk''s inlet and abort
constructs. This exte

nsion is faithful in that it obeys Java''s ordinary
serial semantics wh

en executed on a single processor. When
executed in parallel however
an exception thrown by a JCilk
computation signals its sibling computa

tions to abort which yields
a clean semantics in which only a single e

xception from the enclosing
try block is handled. The decision to impl

icitly abort side computations
opens a Pandora''s box of subsidiary lin

guistic problems to be resolved
however. For instance aborting might

cause a computation to be
interrupted asynchronously causing havoc in p

rogrammer understanding
of code behavior. To minimize the complexity of
reasoning about aborts
JCilk signals them semisynchronously so that ab

ort signals do not
interrupt ordinary serial code. In addition JCilk

propagates an abort
signal throughout a subcomputation naturally with a
built-in CilkAbort
exception thereby allowing programmers to handle c

lean-up by simply
catching the CilkAbort exception.

The semantics
of JCilk allow programs with speculative computations
to be programmed

easily. Speculation is essential for parallelizing
programs such as bra

nch-and-bound or heuristic search. We show how
JCilk''s linguistic mech

anisms can be used to program a solution to the
queens problem.