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

Semantics of transactional memory and automatic mutual exclusion

Published:07 January 2008Publication History

ABSTRACT

Software Transactional Memory (STM) is an attractive basis for the development of language features for concurrent programming. However, the semantics of these features can be delicate and problematic. In this paper we explore the tradeoffs between semantic simplicity, the viability of efficient implementation strategies, and the flexibilityof language constructs. Specifically, we develop semantics and type systems for the constructs of the Automatic Mutual Exclusion (AME) programming model; our results apply also to other constructs, such as atomic blocks. With this semantics as a point of reference, we study several implementation strategies. We model STM systems that use in-place update, optimistic concurrency, lazy conflict detection, and roll-back. These strategies are correct only under non-trivial assumptions that we identify and analyze. One important source of errors is that some efficient implementations create dangerous 'zombie' computations where a transaction keeps running after experiencing a conflict; the assumptions confine the effects of these computations.

References

  1. Martin Abadi, Cormac Flanagan, and Stephen N. Freund. Types for safe locking: Static race detection for Java. ACM Trans. Program. Lang. Syst., 28(2): 207--255, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Ali-Reza Adl-Tabatabai, Brian T. Lewis, Vijay Menon, Brian R. Murphy, Bratin Saha, and Tatiana Shpeisman. Compiler and runtime support for efficient software transactional memory. In PLDI '06: Proc. 2006 ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 26--37, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Weak ordering - a new definition. SIGARCH Comput. Archit. News, 18(3a): 2--14, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Atul Adya, Jon Howell, Marvin Theimer, William J. Bolosky, and John R. Douceur. Cooperative task management without manual stack management. In Proc. 2002 USENIX Annual Technical Conference (USENIX-02), pages 289--302, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Eric Allen, David Chase, Joe Hallett, Victor Luchangco, Jan-Willem Maessen, Sukyoung Ryu, Guy LSteele Jr., and Sam Tobin-Hochstadt. The Fortress language specification, v1.0β. Technical report, 2007.Google ScholarGoogle Scholar
  6. Colin Blundell, E. Christopher Lewis, and Milo M. K. Martin. Deconstructing transactional semantics: The subtleties of atomicity. In Proc. 2005 Workshop on Duplicating, Deconstructing and Debunking, 2005.Google ScholarGoogle Scholar
  7. Brian D. Carlstrom, Austen McDonald, Hassan Chafi, JaeWoong Chung, Chi Cao Minh, Christos Kozyrakis, and Kunle Olukotun. The Atomos transactional programming language. In PLDI '06: Proc. 2006 ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 1--13, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. David Dice, Ori Shalev, and Nir Shavit. Transactional locking II. In Proc. of the 20th International Symposium on Distributed Computing (DISC 2006), pages 194--208, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Dan Grossman, Jeremy Manson, and William Pugh. What do high-level memory models mean for transactions? In MSPC '06: Proc. 2006 Workshop on Memory System Performance and Correctness, pages 62--69, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Tim Harris and Keir Fraser. Language support for lightweight transactions. In OOPSLA '03: Proc. 18th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 388--402, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Tim Harris, Simon Marlow, Simon Peyton-Jones, and Maurice Herlihy. Composable memory transactions. In PPoPP '05: Proc. 10th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pages 48--60, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Tim Harris, Mark Plesko, Avraham Shinnar, and David Tarditi. Optimizing memory transactions. In PLDI '06: Proc. 2006 ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 14--25, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Atsushi Igarashi, Benjamin C. Pierce, and Philip Wadler. Featherweight Java: a minimal core calculus for Java and GJ. ACM Trans. Program. Lang. Syst., 23(3): 396--450, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Michael Isard and Andrew Birrell. Automatic mutual exclusion. In Proc. 11th Workshop on Hot Topics in Operating Systems, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Suresh Jagannathan, Jan Vitek, Adam Welc, and Antony Hosking. A transactional object calculus. Science of Computer Programming, 57(2):164--186, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Bradley C. Kuszmaul and Charles E. Leiserson. Transactions everywhere. Technical report, 2003. http://hdl.handle.net/1721.1/3692.Google ScholarGoogle Scholar
  17. Ben Liblit. An operational semantics for LogTM. Technical Report 1571, U. Wisconsin-Madison, 2006. Version 1.0.Google ScholarGoogle Scholar
  18. Jeremy Manson, Jason Baker, Antonio Cunei, Suresh Jagannathan, Marek Prochazka, Bin Xin, and Jan Vitek. Preemptible atomic regions for real-time Java. In Proceedings of the 26th IEEE Real-Time Systems Symposium (RTSS), 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Jeremy Manson, William Pugh, and Sarita V. Adve. The Java memory model. In POPL '05: Proc. 32nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 378--391, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Katherine F. Moore and Dan Grossman. High-level small-step operational semantics for transactions. To appear, POPL '08: Proc. 35th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Kevin E. Moore, Jayaram Bobba, Michelle J. Moravan, Mark D. Hill, and David A. Wood. LogTM: Log--based transactional memory. In Proc. 12th International Symposium on High-Performance Computer Architecture, pages 254--265. 2006.Google ScholarGoogle ScholarCross RefCross Ref
  22. Mayur Naik, Alex Aiken, and John Whaley. Effective static race detection for Java. In PLDI '06: Proc. 2006 ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 308--319, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Bratin Saha, Ali-Reza Adl-Tabatabai, Richard L. Hudson, Chi Cao Minh, and Benjamin Hertzberg. McRT-STM: a high performance software transactional memory system for a multi-core runtime. In PPoPP '06: Proc. Eleventh ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pages 187--197, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Michael L. Scott. Sequential specification of transactional memory semantics. In Proc. 1st ACM SIGPLAN Workshop on Languages, Compilers, and Hardware Support for Transactional Computing. 2006.Google ScholarGoogle Scholar
  25. Nir Shavit and Dan Touitou. Software transactional memory. In Proc. 14th Annual ACM Symposium on Principles of Distributed Computing, pages 204--213, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Tatiana Shpeisman, Vijay Menon, Ali-Reza Adl-Tabatabai, Steven Balensiefer, Dan Grossman, Richard L. Hudson, Katherine F. Moore, and Bratin Saha. Enforcing isolation and ordering in STM. In PLDI '07: Proc. 2007 ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 78--88, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. 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
  28. Nicholas Sterling. Warlock: A static data race analysis tool. In Proc. USENIX Winter Technical Conference, 1993.Google ScholarGoogle Scholar
  29. Adam Welc, Suresh Jagannathan, and Antony Hosking. Safe futures for Java. In OOPSLA '05: Proc. 20th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 439--453, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Semantics of transactional memory and automatic mutual exclusion

      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!