A monad for deterministic parallelism

We present a new programming model for deterministic parallel computation in a pure functional language. The model is monadic and has explicit granularity, but allows dynamic construction of dataflow networks that are scheduled at runtime, while remaining deterministic and pure. The implementation is based on monadic concurrency, which has until now only been used to simulate concurrency in functional languages, rather than to provide parallelism. We present the API with its semantics, and argue that parallel execution is deterministic. Furthermore, we present a complete work-stealing scheduler implemented as a Haskell library, and we show that it performs at least as well as the existing parallel programming models in Haskell.

[1]  Hans-Wolfgang Loidl,et al.  Seq no more: better strategies for parallel Haskell , 2010 .

[2]  Simon L. Peyton Jones,et al.  Lazy functional state threads , 1994, PLDI '94.

[3]  Vivek Sarkar,et al.  Comparing the usability of library vs. language approaches to task parallelism , 2010, PLATEAU '10.

[4]  Peng Li,et al.  Combining events and threads for scalable network services implementation and evaluation of monadic, application-level concurrency primitives , 2007, PLDI '07.

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

[6]  Steven Hand,et al.  Scripting the Cloud with Skywriting , 2010, HotCloud.

[7]  Giovanni De Micheli,et al.  Readings in hardware / software co-design , 2001 .

[8]  Simon L. Peyton Jones,et al.  Data parallel Haskell: a status report , 2007, DAMP '07.

[9]  Claudio V. Russo,et al.  Parallel concurrent ML , 2009, ICFP.

[10]  John H. Reppy,et al.  Manticore: a heterogeneous parallel language , 2007, DAMP '07.

[11]  Keshav Pingali,et al.  I-structures: data structures for parallel computing , 1986, Graph Reduction.

[12]  Guy E. Blelloch,et al.  Scheduling deterministric parallel programs , 2009 .

[13]  Enno Scholz A concurrency monad based on constructor primitives: or, being first-class is not enough , 1995 .

[14]  Murray Cole,et al.  Algorithmic Skeletons: Structured Management of Parallel Computation , 1989 .

[15]  Hans-Wolfgang Loidl,et al.  Algorithm + strategy = parallelism , 1998, Journal of Functional Programming.

[16]  Arvind,et al.  Implicit parallel programming in pH , 2001 .

[17]  Philip W. Trinder,et al.  An operational semantics for parallel lazy evaluation , 2000, ICFP '00.

[18]  Michael I. Gordon,et al.  Exploiting coarse-grained task, data, and pipeline parallelism in stream programs , 2006, ASPLOS XII.

[19]  Koen Claessen,et al.  A poor man's concurrency monad , 1999, Journal of Functional Programming.