skip to main content
10.1145/1328438.1328448acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
research-article

High-level small-step operational semantics for transactions

Published:07 January 2008Publication History

ABSTRACT

Software transactions have received significant attention as a way to simplify shared-memory concurrent programming, but insufficient focus has been given to the precise meaning of software transactions or their interaction with other language features. This work begins to rectify that situation by presenting a family of formal languages that model a wide variety of behaviors for software transactions. These languages abstract away implementation details of transactional memory, providing high-level definitions suitable for programming languages. We use small-step semantics in order to represent explicitly the interleaved execution of threads that is necessary to investigate pertinent issues.

We demonstrate the value of our core approach to modeling transactions by investigating two issues in depth. First, we consider parallel nesting, in which parallelism and transactions can nest arbitrarily. Second, we present multiple models for weak isolation, in which nontransactional code can violate the isolation of a transaction. For both, type-and-effect systems let us soundly and statically restrict what computation can occur inside or outside a transaction. We prove some key language-equivalence theorems to confirm that under sufficient static restrictions, in particular that each mutable memory location is used outside transactions or inside transactions (but not both), no program can determine whether the language implementation uses weak isolation or strong isolation.

References

  1. Mart1n Abadi, Andrew Birrell, Tim Harris, and Michael Isard. Semantics of transactional memory and automatic mutual exclusion. In 35th ACM Symposium on Principles of Programming Languages, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Ali-Reza Adl-Tabatabai, Brian Lewis, Vijay Menon, Brian R. Murphy, Bratin Saha, and Tatiana Shpeisman. Compiler and runtime support for efficient software transactional memory. In ACM Conference on Programming Language Design and Implementation, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Kunal Agrawal, Charles E. Leiserson, and Jim Sukha. Memory models for open-nested transactions. In ACM SIGPLAN Workshop on Memory Systems Performance & Correctness, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Eric Allen, David Chase, Joe Hallet, Victor Luchangco, Jan-Willem Maessen, Sukyoung Ryu, Guy L. Steele Jr., and Sam Tobin-Hochstadt. The Fortress language specification, version 1.0beta, 2007. http://research.sun.com/projects/plrg/Publications/fortress1.0beta.pdf.Google ScholarGoogle Scholar
  5. Colin Blundell, E Christopher Lewis, and Milo M. K. Martin. Subtleties of transactional memory atomicity semantics. Computer Architecture Letters, 5(2), 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Brian D. Carlstrom, JaeWoong Chung, Austen McDonald, Hassan Chafi, Christos Kozyrakis, and Kunle Olukotun. The Atomos transactional programming language. In ACM Conference on Programming Language Design and Implementation, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Peter Damron, Alexandra Fedorova, Yossi Lev, Victor Luchangco, Mark Moir, and Daniel Nussbaum. Hybrid transactional memory. In International Conference on Architectural Support for Programming Languages and Operating Systems, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Cormac Flanagan and Martín Abadi. Types for safe locking. In European Symposium on Programming, volume 1576 of Lecture Notes in Computer Science, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Matteo Frigo and Victor Luchangco. Computation-centric memory models. In ACM Symposium on Parallel Algorithms and Architectures, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Dan Grossman, Jeremy Manson, and William Pugh. What do high-level memory models mean for transactions? In ACM SIGPLAN Workshop on Memory Systems Performance & Correctness, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Nicholas Haines, Darrell Kindred, J. Gregory Morrisett, Scott M. Nettles, and Jeannette M. Wing. Composing first-class transactions. ACM Trans. on Programming Languages and Systems, 16(6):1719--1736, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Tim Harris. Exceptions and side-effects in atomic blocks. In PODC Workshop on Concurrency and Synchronization in Java Programs, 2004.Google ScholarGoogle Scholar
  13. Tim Harris and Keir Fraser. Language support for lightweight transactions. In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Tim Harris, Simon Marlow, Simon Peyton Jones, and Maurice Herlihy. Composable memory transactions. In ACM Symposium on Principles and Practice of Parallel Programming, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Tim Harris, Mark Plesko, Avraham Shinnar, and David Tarditi. Optimizing memory transactions. In ACM Conference on Programming Language Design and Implementation, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Maurice Herlihy, Victor Luchangco, and Mark Moir. A flexible framework for implementing software transactional memory. In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Richard Hudson, Bratin Saha, Ali-Reza Adl-Tabatabai, and Benjamin Hertzberg. McRT-Malloc: A scalable transactional memory allocator. In International Symposium on Memory Management, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Atsushi Igarashi, Benjamin C. Pierce, and Philip Wadler. Featherweight Java: a minimal core calculus for Java and GJ. ACM Trans. on Programming Languages and Systems, 23(3), 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Suresh Jagannathan, Jan Vitek, Adam Welc, and Antony L. Hosking. A transactional object calculus. Science of Computer Programming, 57(2), 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Aaron Kimball and Dan Grossman. Software transactions meet first-class continuations. In 8th Annual Workshop on Scheme and Functional Programming, 2007.Google ScholarGoogle Scholar
  21. Sanjeev Kumar, Michael Chu, Christopher J. Hughes, Partha Kundu, and Anthony Nguyen. Hybrid transactional memory. In ACM Symposium on Principles and Practice of Parallel Programming, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. James R. Larus and Ravi Rajwar. Transactional Memory. Morgan & Claypool Publishers, 2006.Google ScholarGoogle Scholar
  23. Ben Liblit. An operational semantics for LogTM. Technical Report 1571, University of Wisconsin-Madison, 2006.Google ScholarGoogle Scholar
  24. Jeremy Manson, William Pugh, and Sarita V. Adve. The Java memory model. In 32nd ACM Symposium on Principles of Programming Languages, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Virendra J. Marathe, William N. Scherer, and Michael L. Scott. Adaptive software transactional memory. In International Symposium on Distributed Computing, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Katherine F. Moore and Dan Grossman. High-level small-step operational semantics for transactions (technical companion). Technical report, Univ. of Wash. Dept. of Computer Science & Engineering, 2007. http://www.cs.washington.edu/homes/kfm/atomsfamily proofs.pdf.Google ScholarGoogle Scholar
  27. Michelle J. Moravan, Jayaram Bobba, Kevin E. Moore, Luke Yen, Mark D. Hill, Ben Liblit, Michael M. Swift, and David A. Wood. Supporting nested transactional memory in LogTM. In 12th International Conference on Architectural Support for Programming Languages and Operating Systems, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. J. Eliot B. Moss. Nested Transactions: An Approach to Reliable Distributed Computing. The MIT Press, 1985. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. J. Eliot B. Moss and Antony L. Hosking. Nested transactional memory: Model and preliminary architecture sketches. In Synchronization and Concurrency in Object-Oriented Languages (SCOOL), 2005.Google ScholarGoogle Scholar
  30. Michael F. Ringenburg and Dan Grossman. AtomCaml: First-class atomicity via rollback. In 10th ACM International Conference on Functional Programming, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Michael L. Scott. Sequential specification of transactional memory semantics. In Workshop on Languages, Compilers, and Hardware Support for Transactional Computing (TRANSACT), 2006.Google ScholarGoogle Scholar
  32. Tatiana Shpeisman, Vijay Menon, Ali-Reza Adl-Tabatabai, Steve Balensiefer, Dan Grossman, Richard Hudson, Katherine F. Moore, and Bratin Saha. Enforcing isolation and ordering in STM. In ACM Conference on Programming Language Design and Implementation, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Michael F. Spear, Virendra J. Marathe, Luke Dalessandro, and Michael L. Scott. Privatization techniques for software transactional memory. Technical Report 915, Computer Science Department, University of Rochester, 2007.Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Jan Vitek, Suresh Jagannathan, Adam Welc, and Antony L. Hosking. A semantic framework for designer transactions. In European Symposium on Programming, volume 2986 of Lecture Notes in Computer Science, 2004.Google ScholarGoogle ScholarCross RefCross Ref
  35. Philip Wadler. The marriage of effects and monads. In 3rd ACM International Conference on Functional Programming, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Pawel T. Wojciechowski. Isolation-only transactions by typing and versioning. In ACM International Conference on Principles and Practice of Declarative Programming, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. High-level small-step operational semantics for transactions

            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

            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!