skip to main content
research-article

Taming the parallel effect zoo: extensible deterministic parallelism with LVish

Published:09 June 2014Publication History
Skip Abstract Section

Abstract

A fundamental challenge of parallel programming is to ensure that the observable outcome of a program remains deterministic in spite of parallel execution. Language-level enforcement of determinism is possible, but existing deterministic-by-construction parallel programming models tend to lack features that would make them applicable to a broad range of problems. Moreover, they lack extensibility: it is difficult to add or change language features without breaking the determinism guarantee.

The recently proposed LVars programming model, and the accompanying LVish Haskell library, took a step toward broadly-applicable guaranteed-deterministic parallel programming. The LVars model allows communication through shared monotonic data structures to which information can only be added, never removed, and for which the order in which information is added is not observable. LVish provides a Par monad for parallel computation that encapsulates determinism-preserving effects while allowing a more flexible form of communication between parallel tasks than previous guaranteed-deterministic models provided.

While applying LVar-based programming to real problems using LVish, we have identified and implemented three capabilities that extend its reach: inflationary updates other than least-upper-bound writes; transitive task cancellation; and parallel mutation of non-overlapping memory locations. The unifying abstraction we use to add these capabilities to LVish---without suffering added complexity or cost in the core LVish implementation, or compromising determinism---is a form of monad transformer, extended to handle the Par monad. With our extensions, LVish provides the most broadly applicable guaranteed-deterministic parallel programming interface available to date. We demonstrate the viability of our approach both with traditional parallel benchmarks and with results from a real-world case study: a bioinformatics application that we parallelized using our extended version of LVish.

References

  1. Arvind, R. S. Nikhil, and K. K. Pingali. I-structures: data structures for parallel computing. ACM Trans. Program. Lang. Syst., 11(4), Oct. 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. G. E. Blelloch, J. T. Fineman, P. B. Gibbons, and J. Shun. Internally deterministic parallel algorithms can be fast. In PPoPP, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. R. L. Bocchino, Jr., V. S. Adve, D. Dig, S. V. Adve, S. Heumann, R. Komuravelli, J. Overbey, P. Simmons, H. Sung, and M. Vakilian. A type and effect system for deterministic parallel Java. In OOPSLA, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Z. Budimlić, M. Burke, V. Cavé, K. Knobe, G. Lowney, R. Newton, J. Palsberg, D. Peixotto, V. Sarkar, F. Schlimbach, and S. Taşirlar. Concurrent Collections. Sci. Program., 18(3-4), Aug. 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. M. M. Chakravarty, G. Keller, S. Lee, T. L. McDonell, and V. Grover. Accelerating Haskell array codes with multicore GPUs. In DAMP, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. H. Cui, J. Wu, C.-C. Tsai, and J. Yang. Stable deterministic multi-threading through schedule memoization. In OSDI, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. A. Foltzer, A. Kulkarni, R. Swords, S. Sasidharan, E. Jiang, and R. R. Newton. A meta-scheduler for the par-monad: Composable scheduling for the heterogeneous cloud. In ICFP: International Conference on Functional Programming. ACM, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. M. I. Gordon, W. Thies, M. Karczmarek, J. Lin, A. S. Meli, C. Leger, A. A. Lamb, J. Wong, H. Hoffman, D. Z. Maze, and S. Amarasinghe. A stream compiler for communication-exposed architectures. In ASPLOS, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. G. Kahn. The semantics of a simple language for parallel programming. In J. L. Rosenfeld, editor, Information processing. North Holland, Amsterdam, Aug. 1974.Google ScholarGoogle Scholar
  10. O. Kiselyov, A. Sabry, and C. Swords. Extensible effects: an alternative to monad transformers. In Haskell, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. L. Kuper and R. R. Newton. LVars: lattice-based data structures for deterministic parallelism. In FHPC, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. L. Kuper, A. Turon, N. R. Krishnaswami, and R. R. Newton. Freeze after writing: Quasi-deterministic parallel programming with LVars. In POPL, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. C. E. Leiserson, T. B. Schardl, and J. Sukha. Deterministic parallel random-number generation for dynamic-multithreading platforms. In PPoPP, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. T. Liu, C. Curtsinger, and E. D. Berger. Dthreads: Efficient deterministic multithreading. In SOSP, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. S. Marlow, S. Peyton Jones, and S. Singh. Runtime support for multicore Haskell. In ICFP, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. S. Marlow, R. Newton, and S. Peyton Jones. A monad for deterministic parallelism. In Haskell, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. P. Narayanan and R. R. Newton. Graph algorithms in a guaranteed-deterministic language. In Workshop on Deterministic and Correctness in Parallel Programming (WoDet'14), 2014.Google ScholarGoogle Scholar
  18. R. R. Newton and I. L. Newton. PhyBin: binning trees by topology. PeerJ, 1:e187, Oct. 2013.Google ScholarGoogle ScholarCross RefCross Ref
  19. S.-J. Sul and T. L. Williams. A randomized algorithm for comparing sets of phylogenetic trees. In APBC, 2007.Google ScholarGoogle ScholarCross RefCross Ref
  20. V. Weinberg. Data-parallel programming with Intel Array Building Blocks (ArBB). CoRR, abs/1211.1581, 2012.Google ScholarGoogle Scholar

Index Terms

  1. Taming the parallel effect zoo: extensible deterministic parallelism with LVish

            Recommendations

            Comments

            Login options

            Check if you have access through your login credentials or your institution to get full access on this article.

            Sign in

            Full Access

            • Published in

              cover image ACM SIGPLAN Notices
              ACM SIGPLAN Notices  Volume 49, Issue 6
              PLDI '14
              June 2014
              598 pages
              ISSN:0362-1340
              EISSN:1558-1160
              DOI:10.1145/2666356
              • Editor:
              • Andy Gill
              Issue’s Table of Contents
              • cover image ACM Conferences
                PLDI '14: Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation
                June 2014
                619 pages
                ISBN:9781450327848
                DOI:10.1145/2594291

              Copyright © 2014 ACM

              Publisher

              Association for Computing Machinery

              New York, NY, United States

              Publication History

              • Published: 9 June 2014

              Check for updates

              Qualifiers

              • research-article

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader
            About Cookies On This Site

            We use cookies to ensure that we give you the best experience on our website.

            Learn more

            Got it!