skip to main content
10.1145/2034675.2034685acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
research-article

A monad for deterministic parallelism

Published:22 September 2011Publication History

ABSTRACT

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.

Skip Supplemental Material Section

Supplemental Material

_talk7.mp4

mp4

58.5 MB

References

  1. Arvind, Rishiyur S. Nikhil, and Keshav K. Pingali. I-structures: data structures for parallel computing. ACM Trans. Program. Lang. Syst., 11: 598--632, October 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Clem Baker-Finch, David J. King, and Phil Trinder. An operational semantics for parallel lazy evaluation. In Proceedings of the fifth ACM SIGPLAN international conference on Functional programming, ICFP '00, pages 162--173, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Robert D. Blumofe, Christopher F. Joerg, Bradley C. Kuszmaul, Charles E. Leiserson, Keith H. Randall, and Yuli Zhou. Cilk: an efficient multithreaded runtime system. In Proceedings of the fifth ACM SIGPLAN symposium on Principles and practice of parallel programming, pages 207--216, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Zoran Budimlic, Michael Burke, Vincent Cave, Kathleen Knobe, Geoff Lowney, Ryan Newton, Jens Palsberg, David Peixotto, Vivek Sarkar, Frank Schlimbach, and Sagnak Tasirlar. The CnC programming model. Journal of Scientific Programming, 2010.Google ScholarGoogle Scholar
  5. Vincent Cavé, Zoran Budimlić, and Vivek Sarkar. Comparing the usability of library vs. language approaches to task parallelism. In Evaluation and Usability of Programming Languages and Tools, PLATEAU '10, pages 9:1--9:6. ACM, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. M. Chakravarty, R. Leshchinskiy, S. Peyton Jones, G. Keller, and S. Marlow. Data Parallel Haskell: a status report. In DAMP'07 -- Workshop on Declarative Aspects of Multicore Programming. ACM Press, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Koen Claessen. A poor man's concurrency monad. Journal of Functional Programming, 9: 313--323, May 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Murray Cole. Algorithmic Skeletons: structured management of parallel computation. MIT Press, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Matthew Fluet, Mike Rainey, John Reppy, Adam Shaw, and Yingqi Xiao. Manticore: a heterogeneous parallel language. In Proceedings of the 2007 workshop on Declarative aspects of multicore programming, pages 37--44, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. M. I. Gordon et al. Exploiting coarse-grained task, data, and pipeline parallelism in stream programs. In ASPLOS-XII: Proceedings of the 12th international conference on Architectural support for programming languages and operating systems, pages 151--162, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. John Launchbury and Simon L. Peyton Jones. Lazy functional state threads. In Proceedings of the ACM SIGPLAN 1994 conference on Programming language design and implementation, pages 24--35, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Edward A. Lee and Thomas M. Parks. Readings in hardware/software co-design. chapter Dataflow process networks, pages 59--85. Kluwer Academic Publishers, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Peng Li and Steve Zdancewic. Combining events and threads for scalable network services implementation and evaluation of monadic, application-level concurrency primitives. In Proceedings of the 2007 ACM SIGPLAN conference on Programming language design and implementation, PLDI '07, pages 189--199, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Simon Marlow, Patrick Maier, Hans-Wolfgang Loidl, Mustafa K. Aswad, and Phil Trinder. Seq no more: better strategies for parallel Haskell. In Proceedings of the third ACM Haskell symposium on Haskell, pages 91--102, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Derek Gordon Murray and Steven Hand. Scripting the cloud with Skywriting. In HotCloud '10: Proceedings of the Second Workshop on Hot Topics in Cloud Computing, Berkeley, CA, USA, 2010. USENIX. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Rishiyur Arvind Nikhil. Implicit parallel programming in pH. Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 2001. ISBN 1-55860-644-0.Google ScholarGoogle Scholar
  17. John Reppy, Claudio V. Russo, and Yingqi Xiao. Parallel concurrent ML. In Proceedings of the 14th ACM SIGPLAN international conference on Functional programming, pages 257--268, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Enno Scholz. A concurrency monad based on constructor primitives, or, being first-class is not enough. Technical report, Universität Berlin, 1995.Google ScholarGoogle Scholar
  19. Daniel John Spoonhower. Scheduling deterministric parallel programs. PhD thesis, Carnegie Mellon University, 2009.Google ScholarGoogle Scholar
  20. PW Trinder, K Hammond, H-W Loidl, and SL Peyton Jones. Algorithm + strategy = parallelism. 8: 23--60, January 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. A monad for deterministic parallelism

      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
      • Published in

        cover image ACM Conferences
        Haskell '11: Proceedings of the 4th ACM symposium on Haskell
        September 2011
        136 pages
        ISBN:9781450308601
        DOI:10.1145/2034675
        • cover image ACM SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 46, Issue 12
          Haskell '11
          December 2011
          129 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/2096148
          Issue’s Table of Contents

        Copyright © 2011 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 22 September 2011

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Author Tags

        Qualifiers

        • research-article

        Acceptance Rates

        Overall Acceptance Rate57of143submissions,40%

        Upcoming Conference

        ICFP '24

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader