skip to main content
research-article
Open Access

Æminium: A Permission-Based Concurrent-by-Default Programming Language Approach

Published:01 March 2014Publication History
Skip Abstract Section

Abstract

Writing concurrent applications is extremely challenging, not only in terms of producing bug-free and maintainable software, but also for enabling developer productivity. In this article we present the Æminium concurrent-by-default programming language. Using Æminium programmers express data dependencies rather than control flow between instructions. Dependencies are expressed using permissions, which are used by the type system to automatically parallelize the application. The Æminium approach provides a modular and composable mechanism for writing concurrent applications, preventing data races in a provable way. This allows programmers to shift their attention from low-level, error-prone reasoning about thread interleaving and synchronization to focus on the core functionality of their applications. We study the semantics of Æminium through μÆminium, a sound core calculus that leverages permission flow to enable concurrent-by-default execution. After discussing our prototype implementation we present several case studies of our system. Our case studies show up to 6.5X speedup on an eight-core machine when leveraging data group permissions to manage access to shared state, and more than 70% higher throughput in a Web server application.

References

  1. Acar, U. A., Charguéraud, A., and Rainey, M. 2011. Oracle scheduling: Controlling granularity in implicitly parallel languages. In Proceedings of the ACM International Conference on Object Oriented Programming Systems, Languages, and Applications (OOPSLA’11). Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Adve, S. V. and Boehm, H.-J. 2010. Memory models: A case for rethinking parallel languages and hardware. Comm. ACM 53, 8, 90--101. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Aldrich, J., Sunshine, J., Saini, D., and Sparks, Z. 2009. Typestate-oriented programming. In Proceedings of the ACM International Conference on Object Oriented Programming Systems, Languages, and Applications (OOPSLA’09). Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Aldrich, J., Beckman, N. E., Bocchino, R., Naden, K., Saini, D., Stork, S., and Sunshine, J. 2012. The plaid language: Typed core specification. Tech. rep. CMU-ISR-12-103, Carnegie Mellon University.Google ScholarGoogle Scholar
  5. Allen, E., Chase, D., Hallett, J., Luchangco, V., Maessen, J., Ryu, S., Steele Jr, G., and Tobinhochstadt, S. 2008. The fortress language specification version 1.0. Tech. rep., Sun Microsystems.Google ScholarGoogle Scholar
  6. Anderson, Z., Gay, D., Ennals, R., and Brewer, E. 2008. Sharc: Checking data sharing strategies for multithreaded C. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI’08). ACM Press, New York, 149--158. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Beckman, N. E., Bierhoff, K., and Aldrich, J. 2008. Verifying correct usage of atomic blocks and typestate. In Proceedings of the ACM International Conference on Object Oriented Programming Systems, Languages and Applications (OOPSLA’08). Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Blelloch, G. E. and Greiner, J. 1996. A provable time and space efficient implementation of NESL. In Proceedings of the 1st ACM SIGPLAN International Conference on Functional Programming (ICFP’96). 213--225. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Blumofe, R. D., Joerg, C. F., Kuszmaul, B. C., Leiserson, C. E., Randall, K. H., and Zhou, Y. 1995. Cilk: An efficient multithreaded runtime system. In Proceedings of the ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP’95). Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Bocchino, Jr., R. L., Adve, V. S., Dig, D., Adve, S. V., Heumann, S., Komuravelli, R., Overbey, J., Simmons, P., Sung, H., and Vakilian, M. 2009. A type and effect system for deterministic parallel Java. In Proceedings of the ACM International Conference on Object Oriented Programming Systems, Languages and Applications (OOPSLA’09). Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Bocchino, Jr., R., Heumann, S., Honarmand, N., Adve, S., Adve, V., Welc, A., and Shpeisman, T. 2011. Safe nondeterminism in a deterministic-by-default parallel language. In Proceedings of the 38th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL’11). 535--548. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Boehm, H.-J. 2009. Transactional memory should be an implementation technique, not a programming interface. Tech. rep. HPL-2009-45, HP Laboratories.Google ScholarGoogle Scholar
  13. Boyapati, C., Lee, R., and Rinard, M. 2002. Ownership types for safe programming: Preventing data races and deadlocks. In Proceedings of the ACM International Conference on Object Oriented Programming Systems, Languages and Applications (OOPSLA’02). 211--230. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Boyland, J. 2003. Checking interference with fractional permissions. In Proceedings of the 10th International Symposium on Static Analysis. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Clarke, D. G., Potter, J. M., and Noble, J. 1998. Ownership types for flexible alias protection. In Proceedings of the ACM International Conference on Object Oriented Programming Systems, Languages and Applications (OOPSLA’98). 48--64. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Click, C. and Paleczny, M. 1995. A simple graph-based intermediate representation. In Papers from the ACM SIGPLAN Workshop on Intermediate Representations (IR’95). ACM Press, New York, 35--49. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Craik, A. and Kelly, W. 2010. Using ownership to reason about inherent parallelism in object-oriented programs. In Proceedings of the 19th Joint European Conference on Theory and Practice of Software, and the International Conference on Compiler Construction (CC’10/ETAPS’10). 145--164. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Fahndrich, M. and Deline, R. 2002. Adoption and focus: Practical linear types for imperative programming. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI’02). Vol. 37, ACM Press, New York, 13--24. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Galilée, F., Cavalheiro, G. G., Louis Roch, J., and Doreille, M. 1998. Athapascan-1: On-line building data flow graph in a parallel language. In Proceedings of the International Conference on Parallel Architectures and Compilation Techniques. 88. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Gifford, D. K. and Lucassen, J. M. 1986. Integrating functional and imperative programming. In Proceedings of the ACM Conference on LISP and Functional Programming (LFP’86). 28--38. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Girard, J.-Y. 1987. Linear logic. Theor. Comput. Sci. 50, 1. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Goldberg, A. and Robson, D. 1983. Smalltalk-80: The Language and its Implementation. Addison-Wesley Longman Publishing, Boston, MA. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Hindman, B. and Grossman, D. 2006. Atomicity via source-to-source translation. In Proceedings of the Workshop on Memory System Performance and Correctness (MSPC’06). ACM Press, New York, 82--91. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Igarashi, A., Pierce, B. C., and Wadler, P. 2001. Featherweight Java: A minimal core calculus for Java and GJ. In Proceedings of the ACM International Conference on Object Oriented Programming Systems, Languages and Applications (OOPSLA’01). Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Leino, K. R. M. 1998. Data groups: Specifying the modification of extended state. In Proceedings of the ACM International Conference on Object Oriented Programming Systems, Languages and Applications (OOPSLA’98). Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Leino, K. R. M., Poetzsch-Heffter, A., and Zhou, Y. 2002. Using data groups to specify and check side effects. ACM SIGPLAN Not. 37, 5, 246--257. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. McKeeman, W. M. 1965. Peephole optimization. Comm. ACM 8, 443--444. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Microsoft Corporation 2009. Axum programmer’s guide. http://msdn.microsoft.com/en-us/devlabs/dd795202.aspx.Google ScholarGoogle Scholar
  29. Moggi, E. 1991. Notions of computation and monads. Inf. Comput. 93, 1, 55--92. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Moore, K. F. and Grossman, D. 2008. High-level small-step operational semantics for transactions. In Proceedings of the 35th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL’08). Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Naden, K., Bocchino, R., Aldrich, J., and Bierhoff, K. 2012. A type system for borrowing permissions. In Proceedings of the 39th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL’12). ACM Press, New York, 557--570. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Pierce, B. C. 2002. Types and Programming Languages. MIT Press, Cambridge, MA. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Rumbaugh, J. 1975. A parallel asynchronous computer architecture for data flow programs. Ph.D. thesis, MIT-LCS-TR-150, MIT.Google ScholarGoogle Scholar
  34. Sarkar, V. 1989. Partitioning and Scheduling Parallel Programs for Multiprocessors. MIT Press, Cambridge, MA. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Stork, S. 2013. ÆMINIUM- Freeing programmers from the shackles of sequentiality. Ph.D. thesis, School of Computer Science, Carnegie Mellon University.Google ScholarGoogle Scholar
  36. Stork, S., Aldrich, J., and Marques, P. 2010. Micro-AEmimium language specification. Tech. rep. CMU-ISR-10-125R2, Carnegie Mellon University.Google ScholarGoogle Scholar
  37. Stork, S., Marques, P., and Aldrich, J. 2009. Concurrency by default: Using permissions to express dataflow in stateful programs. In Proceedings of the 24th ACM SIGPLAN Conference Companion on Object Oriented Programming Systems Languages and Applications. 933--940. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. Stork, S., Naden, K., and Sunshine, J. 2012. AEminium code repository. http://goo.gl/olbMs.Google ScholarGoogle Scholar
  39. Sunshine, J., Naden, K., Stork, S., Aldrich, J., and Tanter, E. 2011. First-class state change in plaid. In Proceedings of the ACM International Conference on Object Oriented Programming Systems, Languages and Applications (OOPSLA’11). ACM Press, New York, 713--732. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Vaziri, M., Tip, F., Dolby, J., and Vitek, J. 2010. A type system for data-centric synchronization. In Proceedings of the ACM International Conference on Object Oriented Programming Systems, Languages and Applications (OOPSLA’10). Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Æminium: A Permission-Based Concurrent-by-Default Programming Language Approach

          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

          • Published in

            cover image ACM Transactions on Programming Languages and Systems
            ACM Transactions on Programming Languages and Systems  Volume 36, Issue 1
            March 2014
            186 pages
            ISSN:0164-0925
            EISSN:1558-4593
            DOI:10.1145/2597180
            Issue’s Table of Contents

            Copyright © 2014 ACM

            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 the author(s) 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: 1 March 2014
            • Accepted: 1 October 2013
            • Revised: 1 June 2013
            • Received: 1 October 2012
            Published in toplas Volume 36, Issue 1

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • research-article
            • Research
            • Refereed

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader