
CMPSCI 691W Parallel and Concurrent Programming Spring 2006
Lecture 10: March 13
Lecturer: Emery Berger Scribe: John Burgess
10.1 Overview
This lecture describes common parallel language constructs and features as well as the explicitly parallel
language Clik.
10.2 Parallel Language Taxonomy
•Fully abstract parallel languages perform all parallelization in the compiler (Haskell, Unity), where
programmer is oblivious of parallelism. A compiler capable of converting single threaded C code to
maximal parallel threads of execution would be the holy grail.
•Explicitly parallel languages (Multilisp, Fortran+, NESL) use constructs like futures to initiate paral-
lelization or special comments for compiler to interpret. NESL can operate on distributed machines or
on multiple CPU platforms.
–Explicit decomposition (CODE, Flux) separates independent tasks from one another.
–Explicit Mapping (Linda) assigns/retrieves data in an abstract pool of available data repositories
that may take arbitrary amounts of time to respond to requests (this abstract pool of tuples
similar to JINI’s abstract pools of tuples).
–Explicit communication is simply static dataflow between worker threads.
–Synchronization (MPI, fork(), Java, POSIX threads, Ada, occam) systems for explicit communica-
tion provide friendlier methods of sharing data like message passing, shared memory, rendezvous,
etc.
10.3 Cilk
•Explicit everything, but threads are abstract and later assigned to machine threads via the compiler
•Shared memory thread coordination
•Provably efficient work stealing scheduler (guaranteed efficiency is rare in parallel languages)
•C language with some additions to notify compiler of parallelism (spawn and sync commands)
•Clean programming model with C language programmer familiarity and portability
•Divide and conquer algorithms are perfect for Cilk (like Fibonacci, but with more work per recursive
call)
10-1