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.
- M. Abadi, A. Birrell, T. Harris, and M. Isard. Semantics of transactional memory and automatic mutual exclusion. In POPL, 2008. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- G. Agha. Actors: A model of concurrent computation in distributed systems. MIT Press, 1986. Google Scholar
Digital Library
- M. D. Allen, S. Sridharan, and G. S. Sohi. Serialization sets: A dynamic dependence-based parallel execution model. In PPOPP, 2009. Google Scholar
Digital Library
- Z. Anderson, D. Gay, R. Ennals, and E. Brewer. SharC: Checking data sharing strategies for multithreaded C. In PLDI, 2008. Google Scholar
Digital Library
- Apple. Concurrency Programming Guide. http://developer.apple.com/library/mac/documentation/General/Conceptual/ConcurrencyProgrammingGuide/, Dec. 2012.Google Scholar
- M. Bauer, S. Treichler, E. Slaughter, and A. Aiken. Legion: Expressing locality and independence with logical regions. In SC'12, 2012. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- E. D. Berger, T. Yang, T. Liu, and G. Novark. Grace: Safe multithreaded programming for C/C++. In OOPSLA, 2009. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- R. L. Bocchino and V. S. Adve. Types, regions, and effects for safe programming with object-oriented parallel frameworks. In ECOOP, 2011. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- J. Canny. A computational approach to edge detection. IEEE Trans. Pattern Analysis and Machine Intelligence, 8(6):679--698, June 1986. Google Scholar
Digital Library
- J. Devietti, B. Lucia, L. Ceze, and M. Oskin. DMP: Deterministic shared memory multiprocessing. In ASPLOS, 2009. Google Scholar
Digital Library
- Y. h. Eom, S. Yang, J. C. Jenista, and B. Demsky. DOJ: Dynamically parallelizing object-oriented programs. In PPoPP, 2012. Google Scholar
Digital Library
- C. Flanagan and S. N. Freund. Type-based race detection for Java. In PLDI, 2000. Google Scholar
Digital Library
- T. Harris, J. Larus, and R. Rajwar. Transactional Memory, 2nd Edition (Synthesis Lectures on Comp. Arch.). Morgan & Claypool, 2010. Google Scholar
Digital Library
- S. Heumann and V. Adve. Disciplined concurrent programming using tasks with effects. In HotPar, 2012. Google Scholar
Digital Library
- S. Heumann and V. Adve. Tasks with effects: A model for disciplined concurrent programming. In WoDet, 2012.Google Scholar
- Intel. Intel Thread Building Blocks Reference Manual. http://software.intel.com/sites/products/documentation/hpc/tbb/referencev2.pdf, Aug. 2011.Google Scholar
- J. C. Jenista, Y. h. Eom, and B. C. Demsky. OoOJava: software out-of-order execution. In PPOPP, 2011. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- C. Ke, L. Liu, C. Zhang, T. Bai, B. Jacobs, and C. Ding. Safe parallel programming using dynamic dependence hints. In OOPSLA, 2011. Google Scholar
Digital Library
- M. Kulkarni, K. Pingali, B. Walter, G. Ramanarayanan, K. Bala, and L. P. Chew. Optimistic parallelism requires abstractions. In PLDI, 2007. Google Scholar
Digital Library
- Y. Long, S. L. Mooney, T. Sondag, and H. Rajan. Implicit invocation meets safe, implicit concurrency. In Generative Programming and Component Engineering (GPCE), 2010. Google Scholar
Digital Library
- R. Lublinerman, J. Zhao, Z. Budimlić, S. Chaudhuri, and V. Sarkar. Delegated isolation. In OOPSLA, 2011. Google Scholar
Digital Library
- Microsoft. Axum. http://msdn.microsoft.com/en-us/devlabs/dd795202.Google Scholar
- Microsoft. Task Parallel Library (TPL). http://msdn.microsoft.com/en-us/library/dd460717.aspx.Google Scholar
- M. Olszewski, J. Ansel, and S. Amarasinghe. Kendo: Efficient deterministic multithreading in software. In ASPLOS, 2009. Google Scholar
Digital Library
- OpenMP Architecture Review Board. OpenMP Application Program Interface, Version 3.1. http://www.openmp.org/mp-documents/OpenMP3.1.pdf, 2011.Google Scholar
- Oracle. Java Platform, Standard Edition 7 API specification. http://download.oracle.com/javase/7/docs/api/.Google Scholar
- 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.Google Scholar
Cross Ref
- M. C. Rinard and M. S. Lam. The design, implementation, and evaluation of Jade. TOPLAS, 20(3):483--545, May 1998. Google Scholar
Digital Library
- G. Rosu and T. F. Serbanuta. An overview of the K semantic framework. Journal of Logic and Algebraic Programming, 79(6), 2010.Google Scholar
Cross Ref
- J. Schafer and A. Poetzsch-Heffter. JCoBox: Generalizing active objects to concurrent components. In ECOOP, 2010. Google Scholar
Digital Library
Index Terms
The tasks with effects model for safe concurrency
Recommendations
The tasks with effects model for safe concurrency
PPoPP '13: Proceedings of the 18th ACM SIGPLAN symposium on Principles and practice of parallel programmingToday'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 ...
Safe nondeterminism in a deterministic-by-default parallel language
POPL '11A 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 ...
Safe nondeterminism in a deterministic-by-default parallel language
POPL '11: Proceedings of the 38th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languagesA 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 ...







Comments