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

Parallel concurrent ML

Published: 31 August 2009 Publication History

Abstract

Concurrent ML (CML) is a high-level message-passing language that supports the construction of first-class synchronous abstractions called events. This mechanism has proven quite effective over the years and has been incorporated in a number of other languages. While CML provides a concurrent programming model, its implementation has always been limited to uniprocessors. This limitation is exploited in the implementation of the synchronization protocol that underlies the event mechanism, but with the advent of cheap parallel processing on the desktop (and laptop), it is time for Parallel CML.
Parallel implementations of CML-like primitives for Java and Haskell exist, but build on high-level synchronization constructs that are unlikely to perform well. This paper presents a novel, parallel implementation of CML that exploits a purpose-built optimistic concurrency protocol designed for both correctness and performance on shared-memory multiprocessors. This work extends and completes an earlier protocol that supported just a strict subset of CML with synchronization on input, but not output events. Our main contributions are a model-checked reference implementation of the protocol and two concrete implementations. This paper focuses on Manticore's functional, continuation-based implementation but briefly discusses an independent, thread-based implementation written in C# and running on Microsoft's stock, parallel runtime. Although very different in detail, both derive from the same design. Experimental evaluation of the Manticore implementation reveals good performance, dispite the extra overhead of multiprocessor synchronization.

Supplementary Material

JPG File (parallelconcurrentmlonvimeo.jpg)
MP4 File (parallelconcurrentmlonvimeo.mp4)

References

[1]
Bornat, R. A protocol for generalized occam. SP&E, 16(9), September 1986, pp. 783--799.
[2]
Buckley, G. N. and A. Silberschatz. An effective implementation for the generalized input-output construct of CSP. ACM TOPLAS, 5(2), April 1983, pp. 223--235.
[3]
The .NET Common Language Runtime. See http://msdn.microsoft.com/en-gb/netframework/.
[4]
Chrysanthakopoulos, G. and S. Singh. An asynchronous messaging library for C#. In Synchronization and Concurrency in Object-Oriented Languages (SCOOL), OOPSLA 2005 Workshop. UR Research, October 2005.
[5]
Demaine, E. D. Higher-order concurrency in Java. In WoTUG20, April 1997, pp. 34--47. Available from http://theory.csail.mit.edu/ edemaine/papers/WoTUG20/.
[6]
Demaine, E. D. Protocols for non-deterministic communication over synchronous channels. In IPPS/SPDP'98, March 1998, pp. 24--30. Available from http://theory.csail.mit.edu/ edemaine/papers/IPPS98/.
[7]
Donnelly, K. and M. Fluet. Transactional events. In ICFP '06, Portland, Oregon, USA, 2006. ACM, pp. 124--135.
[8]
Flatt, M. and R. B. Findler. Kill-safe synchronization abstractions. In PLDI '04, June 2004, pp. 47--58.
[9]
7}manticore-ml07Fluet, M., N. Ford, M. Rainey, J. Reppy, A. Shaw, and Y. Xiao. Status report: The Manticore project. In ML '07. ACM, October 2007, pp. 15--24.
[10]
Fluet, M., M. Rainey, and J. Reppy. A scheduling framework for general-purpose parallel languages. In ICFP '08, Victoria, BC, Candada, September 2008. ACM, pp. 241--252.
[11]
Gansner, E. R. and J. H. Reppy. A Multi-threaded Higher-order User Interface Toolkit, vol. 1 of Software Trends, pp. 61--80. John Wiley&Sons, 1993.
[12]
Herlihy, M. and N. Shavit. The Art of Multiprocessor Programming. Morgan Kaufmann Publishers, New York, NY, 2008.
[13]
Knabe, F. A distributed protocol for channel-based communication with choice. Technical Report ECRC-92-16, European Computer-industry Research Center, October 1992.
[14]
Leroy, X. The Objective Caml System (release 3.00), April 2000. Available from http://caml.inria.fr.
[15]
mlton-concurMLton. Concurrent ML. Available at http://mlton.org/ConcurrentML.
[16]
Musuvathi, M. and S. Qadeer. Iterative context bounding for systematic testing of multithreaded programs. In PLDI '07, San Diego, CA, June 2007. ACM, pp. 446--455.
[17]
Milner, R., M. Tofte, R. Harper, and D. MacQueen. The Definition of Standard ML (Revised). The MIT Press, Cambridge, MA, 1997.
[18]
Reppy, J. H. Synchronous operations as first-class values. In PLDI '88, June 1988, pp. 250--259.
[19]
Reppy, J. H. CML: A higher-order concurrent language. In PLDI '91. ACM, June 1991, pp. 293--305.
[20]
Reppy, J. H. Concurrent Programming in ML. Cambridge University Press, Cambridge, England, 1999.
[21]
Ritson, C. Multicore scheduling for lightweight communicating processes. Talk at the Workshop on Language and Runtime Support for Concurrent Systems, October 2008. Slides available from http://www.mm-net.org.uk/workshop171008/mmw07-slides.
[22]
Russell, G. Events in Haskell, and how to implement them. In ICFP '01, September 2001, pp. 157--168.
[23]
Reppy, J. and Y. Xiao. Specialization of CML message-passing primitives. In POPL '07. ACM, January 2007, pp. 315--326.
[24]
Reppy, J. and Y. Xiao. Toward a parallel implementation of Concurrent ML. In DAMP '08. ACM, January 2008.
[25]
TG2, E. T. C# language specification. See http://www.ecma-international.org/publications/standards/Ecma-334.htm.
[26]
Vella, K. Seamless parallel computing on heterogeneous networks of multiprocessor workstations. Ph.D. dissertation, University of Kent at Canterbury, December 1998.
[27]
Young, C., L. YN, T. Szymanski, J. Reppy, R. Pike, G. Narlikar, S. Mullender, and E. Grosse. Protium, an infrastructure for partitioned applications. In HotOS-X, January 2001, pp. 41--46.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ICFP '09: Proceedings of the 14th ACM SIGPLAN international conference on Functional programming
August 2009
364 pages
ISBN:9781605583327
DOI:10.1145/1596550
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 44, Issue 9
    ICFP '09
    September 2009
    343 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1631687
    Issue’s Table of Contents
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]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 31 August 2009

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. concurrency
  2. message passing
  3. parallelism

Qualifiers

  • Research-article

Conference

ICFP '09
Sponsor:
ICFP '09: ACM SIGPLAN International Conference on Functional Programming
August 31 - September 2, 2009
Edinburgh, Scotland

Acceptance Rates

Overall Acceptance Rate 333 of 1,064 submissions, 31%

Upcoming Conference

ICFP '25
ACM SIGPLAN International Conference on Functional Programming
October 12 - 18, 2025
Singapore , Singapore

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)14
  • Downloads (Last 6 weeks)0
Reflects downloads up to 02 Feb 2025

Other Metrics

Citations

Cited By

View all

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media