skip to main content
research-article

The tasks with effects model for safe concurrency

Authors Info & Claims
Published:23 February 2013Publication History
Skip Abstract Section

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

Index Terms

  1. The tasks with effects model for safe concurrency

            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

            Full Access

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader
            About Cookies On This Site

            We use cookies to ensure that we give you the best experience on our website.

            Learn more

            Got it!