Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Safe nondeterminism in a deterministic-by-default parallel language

Published: 26 January 2011 Publication History

Abstract

A number of deterministic parallel programming models with strong safety guarantees are emerging, but similar support for nondeterministic algorithms, such as branch and bound search, remains an open question. We present a language together with a type and effect system that supports nondeterministic computations with a deterministic-by-default guarantee: nondeterminism must be explicitly requested via special parallel constructs (marked nd), and any deterministic construct that does not execute any nd construct has deterministic input-output behavior. Moreover, deterministic parallel constructs are always equivalent to a sequential composition of their constituent tasks, even if they enclose, or are enclosed by, nd constructs. Finally, in the execution of nd constructs, interference may occur only between pairs of accesses guarded by atomic statements, so there are no data races, either between atomic statements and unguarded accesses (strong isolation) or between pairs of unguarded accesses (stronger than strong isolation alone). We enforce the guarantees at compile time with modular checking using novel extensions to a previously described effect system. Our effect system extensions also enable the compiler to remove unnecessary transactional synchronization. We provide a static semantics, dynamic semantics, and a complete proof of soundness for the language, both with and without the barrier removal feature. An experimental evaluation shows that our language can achieve good scalability for realistic parallel algorithms, and that the barrier removal techniques provide significant performance gains.

Supplementary Material

MP4 File (49-mpeg-4.mp4)

References

[1]
http://iss.ices.utexas.edu/lonestar/.
[2]
http://gee.cs.oswego.edu/dl/concurrency-interest.
[3]
http://http://sites.google.com/site/deucestm.
[4]
OpenMP Application Program Interface, Version 3.0. http://www.openmp.org/mp-documents/spec30.pdf, 2008.
[5]
M. Abadi et al. Types for safe locking: Static race detection for Java. TOPLAS, 2006.
[6]
M. Abadi et al. Semantics of transactional memory and automatic mutual exclusion. In POPL, 2008.
[7]
M. Abadi et al. Transactional memory with strong atomicity using off-the-shelf memory protection hardware. In PPoPP, 2009.
[8]
A.-R. Adl-Tabatabai et al. Compiler and runtime support for efficient software transactional memory. In PLDI, 2006.
[9]
Y. Afek et al. Lowering STM overhead with static analysis. In LCPC, 2010.
[10]
M. D. Allen et al. Serialization sets: A dynamic dependence-based parallel execution model. In PPOPP, 2009.
[11]
A. Aviram et al. Efficient system-enforced deterministic parallelism. 2010.
[12]
N. E. Beckman et al. Verifying correct usage of atomic blocks and typestate. In OOPSLA, 2008.
[13]
N. E. Beckman et al. Reducing STM overhead with access permissions. In IWACO, 2009.
[14]
T. Bergan et al. CoreDet: A compiler and runtime system for deterministic multithreaded execution. In Int'l. Conf. on Arch. Support for Programming Langs. and Operating Systs. (ASPLOS), 2010.
[15]
E. D. Berger et al. Grace: Safe Multithreaded Programming for C/C. In OOPSLA, 2009.
[16]
R. D. Blumofe et al. Cilk: An efficient multithreaded runtime system. PPOPP, 1995.
[17]
R. L. Bocchino et al. A type and effect system for Deterministic Parallel Java. In OOPSLA, 2009.
[18]
R. L. Bocchino et al. Parallel programming must be deterministic by default. In HotPar, 2009.
[19]
R. L. Bocchino Jr. An Effect System and Language for Deterministic-by-Default Parallel Programming. PhD thesis, University of Illinois, Urbana-Champaign, IL, 2010.
[20]
C. Boyapati et al. Ownership types for safe programming: Preventing data races and deadlocks. In OOPSLA, 2002.
[21]
J. Boyland. Checking interference with fractional permissions. SAS, 2003.
[22]
N. G. Bronson et al. Feedback-directed barrier optimization in a strongly isolated STM. In POPL, 2009.
[23]
Z. Budimlic et al. Multi-core implementations of the concurrent collections programming model. In CPC, 2009.
[24]
S. Burckhardt et al. Concurrent programming with revisions and isolation types. In OOPSLA, 2010.
[25]
M. J. Carey et al. A status report on the OO7 OODBMS benchmarking effort. In OOPSLA, 1994.
[26]
L. P. Chew. Guaranteed-quality mesh generation for curved surfaces. In SCG, 1993.
[27]
J. Devietti et al. DMP: Deterministic Shared Memory Multiprocessing. In ASPLOS, 2009.
[28]
D. Dice et al. Transactional locking II. In DISC, 2006.
[29]
C. Flanagan et al. Types for atomicity: Static checking and inference for Java. TOPLAS, 2008.
[30]
A. Ghuloum et al. Ct: A flexible parallel programming model for tera-scale architectures. Intel White Paper, 2007.
[31]
T. Harris et al. Composable memory transactions. In PPoPP, 2005.
[32]
T. Harris et al. Optimizing memory transactions. In PLDI, 2006.
[33]
T. Harris and K. Fraser. Language support for lightweight transactions. In OOPSLA, 2003.
[34]
B. Jacobs et al. A programming model for concurrent object-oriented programs. TOPLAS, 2008.
[35]
A. Kulkarni et al. Task types for pervasive atomicity. In OOPSLA, 2010.
[36]
M. Kulkarni et al. Optimistic parallelism requires abstractions. In PLDI, 2007.
[37]
J. Larus and R. Rajwar. Transactional Memory (Synthesis Lectures on Computer Architecture). Morgan & Claypool Publishers, 2007.
[38]
E. A. Lee. The problem with threads. Computer, 2006.
[39]
R. Lublinerman et al. Parallel programming with object assemblies. In OOPSLA, 2009.
[40]
M. Martin, C. Blundell, and E. Lewis. Subtleties of transactional memory atomicity semantics. IEEE Comp. Arch. Letters, 5(2):17, 2006.
[41]
N. D. Matsakis and T. R. Gross. A time-aware type system for data-race protection and guaranteed initialization. In OOPSLA, 2010.
[42]
K. F. Moore and D. Grossman. High-level small-step operational semantics for transactions. In POPL, 2008.
[43]
M. Olszewski et al. Kendo: Efficient deterministic multithreading in software. In ASPLOS, 2009.
[44]
C. Papadimitriou. The theory of database concurrency control. Computer Science Press, Inc., 1986.
[45]
M. C. Rinard and M. S. Lam. The design, implementation, and evaluation of Jade. TOPLAS, 1998.
[46]
F. T. Schneider, V. Menon, T. Shpeisman, and A.-R. Adl-Tabatabai. Dynamic optimization for efficient strong atomicity. In OOPSLA, 2008.
[47]
T. Shpeisman et al. Enforcing isolation and ordering in STM. In PLDI, 2007.
[48]
M. Vakilian et al. Inferring Method Effect Summaries for Deterministic Parallel Java. Technical Report UIUCDCS-R-2009-3038, U. Illinois, 2009.
[49]
C. von Praun et al. Implicit parallelism with ordered transactions. In PPOPP, 2007.
[50]
A. Welc et al. Safe futures for Java. In OOPSLA, 2005.
[51]
A. Welc et al. Revocation techniques for Java concurrency. Concurrency and Computation: Practice and Experience, 2006.
[52]
R. M. Yoo et al. Kicking the tires of software transactional memory: Why the going gets tough. In SPAA, 2008.

Cited By

View all
  • (2017)Cache locality optimization for recursive programsACM SIGPLAN Notices10.1145/3140587.306238552:6(1-16)Online publication date: 14-Jun-2017
  • (2017)Cache locality optimization for recursive programsProceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/3062341.3062385(1-16)Online publication date: 14-Jun-2017
  • (2017)An Executable Sequential Specification for Spark AggregationNetworked Systems10.1007/978-3-319-59647-1_31(421-438)Online publication date: 14-May-2017
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM SIGPLAN Notices
ACM SIGPLAN Notices  Volume 46, Issue 1
POPL '11
January 2011
624 pages
ISSN:0362-1340
EISSN:1558-1160
DOI:10.1145/1925844
Issue’s Table of Contents
  • cover image ACM Conferences
    POPL '11: Proceedings of the 38th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
    January 2011
    652 pages
    ISBN:9781450304900
    DOI:10.1145/1926385
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: 26 January 2011
Published in SIGPLAN Volume 46, Issue 1

Check for updates

Author Tags

  1. atomic sections
  2. atomicity
  3. data race freedom
  4. determinism
  5. effect systems
  6. effects
  7. nondeterminism
  8. parallel programming languages
  9. strong isolation
  10. tranasctions
  11. transactional memory

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)6
  • Downloads (Last 6 weeks)1
Reflects downloads up to 09 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2017)Cache locality optimization for recursive programsACM SIGPLAN Notices10.1145/3140587.306238552:6(1-16)Online publication date: 14-Jun-2017
  • (2017)Cache locality optimization for recursive programsProceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/3062341.3062385(1-16)Online publication date: 14-Jun-2017
  • (2017)An Executable Sequential Specification for Spark AggregationNetworked Systems10.1007/978-3-319-59647-1_31(421-438)Online publication date: 14-May-2017
  • (2017)Shared-Memory Parallelism Can Be Simple, Fast, and ScalableundefinedOnline publication date: 9-Jun-2017
  • (2016)The Design and Formalization of Mezzo, a Permission-Based Programming LanguageACM Transactions on Programming Languages and Systems10.1145/283702238:4(1-94)Online publication date: 2-Aug-2016
  • (2013)Ownership Types: A SurveyAliasing in Object-Oriented Programming. Types, Analysis and Verification10.1007/978-3-642-36946-9_3(15-58)Online publication date: 2013
  • (2012)Parallel closuresProceedings of the 4th USENIX conference on Hot Topics in Parallelism10.5555/2342788.2342793(5-5)Online publication date: 7-Jun-2012
  • (2012)JATO: Native Code Atomicity for JavaProgramming Languages and Systems10.1007/978-3-642-35182-2_2(2-17)Online publication date: 2012
  • (2024)Disentanglement with Futures, State, and InteractionProceedings of the ACM on Programming Languages10.1145/36328958:POPL(1569-1599)Online publication date: 5-Jan-2024
  • (2023)A Type System for Safe Intermittent ComputingProceedings of the ACM on Programming Languages10.1145/35912507:PLDI(736-760)Online publication date: 6-Jun-2023
  • Show More Cited By

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media