Nothing Special   »   [go: up one dir, main page]

skip to main content
research-article

The tasks with effects model for safe concurrency

Published: 23 February 2013 Publication History

Abstract

Today's widely-used concurrent programming models either provide weak safety guarantees, making it easy to write code with subtle errors, or are limited in the class of programs that they can express. We propose a new concurrent programming model based on tasks with effects that offers strong safety guarantees while still providing the flexibility needed to support the many ways that concurrency is used in complex applications. The core unit of work in our model is a dynamically-created task. The model's key feature is that each task has programmer-specified effects, and a run-time scheduler is used to ensure that two tasks are run concurrently only if they have non-interfering effects. Through the combination of statically verifying the declared effects of tasks and using an effect-aware run-time scheduler, our model is able to guarantee strong safety properties, including data race freedom and atomicity. It is also possible to use our model to write programs and computations that can be statically proven to behave deterministically. We describe the tasks with effects programming model and provide a formal dynamic semantics for it. We also describe our implementation of this model in an extended version of Java and evaluate its use in several programs exhibiting various patterns of concurrency.

References

[1]
M. Abadi, A. Birrell, T. Harris, and M. Isard. Semantics of transactional memory and automatic mutual exclusion. In POPL, 2008.
[2]
S. V. Adve and K. Gharachorloo. Shared memory consistency models: A tutorial. IEEE Comp., Special Issue on Shared-Mem. Multiproc., pages 66--76, December 1996.
[3]
G. Agha. Actors: A model of concurrent computation in distributed systems. MIT Press, 1986.
[4]
M. D. Allen, S. Sridharan, and G. S. Sohi. Serialization sets: A dynamic dependence-based parallel execution model. In PPOPP, 2009.
[5]
Z. Anderson, D. Gay, R. Ennals, and E. Brewer. SharC: Checking data sharing strategies for multithreaded C. In PLDI, 2008.
[6]
Apple. Concurrency Programming Guide. http://developer.apple.com/library/mac/documentation/General/Conceptual/ConcurrencyProgrammingGuide/, Dec. 2012.
[7]
M. Bauer, S. Treichler, E. Slaughter, and A. Aiken. Legion: Expressing locality and independence with logical regions. In SC'12, 2012.
[8]
T. Bergan, O. Anderson, J. Devietti, L. Ceze, and D. Grossman. Core-Det: A compiler and runtime system for deterministic multithreaded execution. In ASPLOS, 2010.
[9]
E. D. Berger, T. Yang, T. Liu, and G. Novark. Grace: Safe multithreaded programming for C/C++. In OOPSLA, 2009.
[10]
M. J. Best, S. Mottishaw, C. Mustard, M. Roth, A. Fedorova, and A. Brownsword. Synchronization via scheduling: Techniques for efficiently managing shared state. In PLDI, 2011.
[11]
R. D. Blumofe, C. F. Joerg, B. C. Kuszmaul, C. E. Leiserson, K. H. Randall, and Y. Zhou. Cilk: An efficient multithreaded runtime system. In PPOPP, 1995.
[12]
R. L. Bocchino and V. S. Adve. Types, regions, and effects for safe programming with object-oriented parallel frameworks. In ECOOP, 2011.
[13]
R. L. Bocchino, 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.
[14]
R. L. Bocchino, S. Heumann, N. Honarmand, S. V. Adve, V. S. Adve, A. Welc, and T. Shpeisman. Safe nondeterminism in a deterministicby-default parallel language. In POPL, 2011.
[15]
J. Canny. A computational approach to edge detection. IEEE Trans. Pattern Analysis and Machine Intelligence, 8(6):679--698, June 1986.
[16]
J. Devietti, B. Lucia, L. Ceze, and M. Oskin. DMP: Deterministic shared memory multiprocessing. In ASPLOS, 2009.
[17]
Y. h. Eom, S. Yang, J. C. Jenista, and B. Demsky. DOJ: Dynamically parallelizing object-oriented programs. In PPoPP, 2012.
[18]
C. Flanagan and S. N. Freund. Type-based race detection for Java. In PLDI, 2000.
[19]
T. Harris, J. Larus, and R. Rajwar. Transactional Memory, 2nd Edition (Synthesis Lectures on Comp. Arch.). Morgan & Claypool, 2010.
[20]
S. Heumann and V. Adve. Disciplined concurrent programming using tasks with effects. In HotPar, 2012.
[21]
S. Heumann and V. Adve. Tasks with effects: A model for disciplined concurrent programming. In WoDet, 2012.
[22]
Intel. Intel Thread Building Blocks Reference Manual. http://software.intel.com/sites/products/documentation/hpc/tbb/referencev2.pdf, Aug. 2011.
[23]
J. C. Jenista, Y. h. Eom, and B. C. Demsky. OoOJava: software out-of-order execution. In PPOPP, 2011.
[24]
R. K. Karmani, A. Shali, and G. Agha. Actor frameworks for the JVM platform: A comparative analysis. In Principles and Practice of Programming in Java (PPPJ), 2009.
[25]
C. Ke, L. Liu, C. Zhang, T. Bai, B. Jacobs, and C. Ding. Safe parallel programming using dynamic dependence hints. In OOPSLA, 2011.
[26]
M. Kulkarni, K. Pingali, B. Walter, G. Ramanarayanan, K. Bala, and L. P. Chew. Optimistic parallelism requires abstractions. In PLDI, 2007.
[27]
Y. Long, S. L. Mooney, T. Sondag, and H. Rajan. Implicit invocation meets safe, implicit concurrency. In Generative Programming and Component Engineering (GPCE), 2010.
[28]
R. Lublinerman, J. Zhao, Z. Budimlić, S. Chaudhuri, and V. Sarkar. Delegated isolation. In OOPSLA, 2011.
[29]
Microsoft. Axum. http://msdn.microsoft.com/en-us/devlabs/dd795202.
[30]
Microsoft. Task Parallel Library (TPL). http://msdn.microsoft.com/en-us/library/dd460717.aspx.
[31]
M. Olszewski, J. Ansel, and S. Amarasinghe. Kendo: Efficient deterministic multithreading in software. In ASPLOS, 2009.
[32]
OpenMP Architecture Review Board. OpenMP Application Program Interface, Version 3.1. http://www.openmp.org/mp-documents/OpenMP3.1.pdf, 2011.
[33]
Oracle. Java Platform, Standard Edition 7 API specification. http://download.oracle.com/javase/7/docs/api/.
[34]
J. M. Perez, R. M. Badia, and J. Labarta. A dependency-aware taskbased programming environment for multi-core architectures. In IEEE International Conference on Cluster Computing, 2008.
[35]
M. C. Rinard and M. S. Lam. The design, implementation, and evaluation of Jade. TOPLAS, 20(3):483--545, May 1998.
[36]
G. Rosu and T. F. Serbanuta. An overview of the K semantic framework. Journal of Logic and Algebraic Programming, 79(6), 2010.
[37]
J. Schafer and A. Poetzsch-Heffter. JCoBox: Generalizing active objects to concurrent components. In ECOOP, 2010.

Cited By

View all
  • (2015)From Rewriting Logic, to Programming Language Semantics, to Program VerificationLogic, Rewriting, and Concurrency10.1007/978-3-319-23165-5_28(598-616)Online publication date: 27-Aug-2015
  • (2022)Understanding and Reaching the Performance Limit of Schedule Tuning on Stable Synchronization DeterminismProceedings of the International Conference on Parallel Architectures and Compilation Techniques10.1145/3559009.3569669(223-238)Online publication date: 8-Oct-2022
  • (2020)Design and Implementation Techniques for an MPI-Oriented AMT Runtime2020 Workshop on Exascale MPI (ExaMPI)10.1109/ExaMPI52011.2020.00009(31-40)Online publication date: Nov-2020
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM SIGPLAN Notices
ACM SIGPLAN Notices  Volume 48, Issue 8
PPoPP '13
August 2013
309 pages
ISSN:0362-1340
EISSN:1558-1160
DOI:10.1145/2517327
Issue’s Table of Contents
  • cover image ACM Conferences
    PPoPP '13: Proceedings of the 18th ACM SIGPLAN symposium on Principles and practice of parallel programming
    February 2013
    332 pages
    ISBN:9781450319225
    DOI:10.1145/2442516
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: 23 February 2013
Published in SIGPLAN Volume 48, Issue 8

Check for updates

Author Tags

  1. atomicity
  2. concurrent and parallel programming
  3. data race freedom
  4. determinism
  5. effects
  6. task isolation
  7. task scheduling
  8. tasks

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

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

Other Metrics

Citations

Cited By

View all
  • (2015)From Rewriting Logic, to Programming Language Semantics, to Program VerificationLogic, Rewriting, and Concurrency10.1007/978-3-319-23165-5_28(598-616)Online publication date: 27-Aug-2015
  • (2022)Understanding and Reaching the Performance Limit of Schedule Tuning on Stable Synchronization DeterminismProceedings of the International Conference on Parallel Architectures and Compilation Techniques10.1145/3559009.3569669(223-238)Online publication date: 8-Oct-2022
  • (2020)Design and Implementation Techniques for an MPI-Oriented AMT Runtime2020 Workshop on Exascale MPI (ExaMPI)10.1109/ExaMPI52011.2020.00009(31-40)Online publication date: Nov-2020
  • (2019)Lazy Determinism for Faster Deterministic MultithreadingProceedings of the Twenty-Fourth International Conference on Architectural Support for Programming Languages and Operating Systems10.1145/3297858.3304047(879-891)Online publication date: 4-Apr-2019
  • (2019)Parallel Roles for Practical Deterministic Parallel ProgrammingLanguages and Compilers for Parallel Computing10.1007/978-3-030-35225-7_12(163-181)Online publication date: 15-Nov-2019
  • (2018)Concurrency-aware object-oriented programming with rolesProceedings of the ACM on Programming Languages10.1145/32765002:OOPSLA(1-30)Online publication date: 24-Oct-2018
  • (2018)A Survey of Recent Trends in Testing Concurrent Software SystemsIEEE Transactions on Software Engineering10.1109/TSE.2017.270708944:8(747-783)Online publication date: 1-Aug-2018
  • (2017)Synchronized-by-Default Concurrency for Shared-Memory SystemsACM SIGPLAN Notices10.1145/3155284.301874752:8(299-312)Online publication date: 26-Jan-2017
  • (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
  • Show More Cited By

View Options

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