skip to main content
research-article

Single global lock semantics in a weakly atomic STM

Published:01 May 2008Publication History
Skip Abstract Section

Abstract

As memory transactions have been proposed as a language-level replacement for locks, there is growing need for well-defined semantics. In contrast to database transactions, transaction memory (TM) semantics are complicated by the fact that programs may access the same memory locations both inside and outside transactions. Strongly atomic semantics, where non-transactional accesses are treated as implicit single-operation transactions, remain difficult to provide without specialized hardware support and/or significant performance overhead. As an alternative, many in the community have informally proposed that a single global lock semantics [16, 9], where transaction semantics are mapped to those of regions protected by a single global lock, provide an intuitive and efficiently implementable model for programmers.

In this paper, we explore the implementation and performance implications of single global lock semantics in a weakly atomic STM from the perspective of Java, and we discuss why even recent STM implementations fall short of these semantics. We describe a new weakly atomic Java STM implementation that provides single global lock semantics while permitting concurrent execution, but we show that this comes at a significant performance cost. We also propose and implement various alternative semantics that loosen single lock requirements while still providing strong guarantees. We compare our new implementations to previous ones, including a strongly atomic STM. [22]

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. A.-R. Adl-Tabatabai, B. T. Lewis, V. S. Menon, B. R. Murphy, B. Saha, and T. Shpeisman. Compiler and runtime support for efficient software transactional memory. In PLDI 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. S. Adve and K. Gharachorloo. Shared memory consistency models: A tutorial. IEEE Computer, 29(12):66--76, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. C. S. Ananian, K. Asanovic, B. C. Kuszmaul, C. E. Leiserson, and S. Lie. Unbounded transactional memory. In HPCA 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. C. Blundell, E. C. Lewis, and M. M. K. Martin. Deconstructing transactions: The subtleties of atomicity. In Fourth Annual Workshop on Duplicating, Deconstructing, and Debunking, 2005.Google ScholarGoogle Scholar
  6. H. Boehm. A memory model for c++: Strawman proposal. In C++ standards committee paper WG21/N1942, February 2006. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1942.html.Google ScholarGoogle Scholar
  7. D. Dice, O. Shalev, and N. Shavit. Transactional Locking II. In DISC 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. J. Gray and A. Reuter. Transaction Processing: Concepts and Techniques. Morgan Kaufmann, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. D. Grossman, J. Manson, and W. Pugh. What do high-level memory models mean for transactions? In MSPC 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. L. Hammond, V. Wong, M. Chen, B. D. Carlstrom, J. D. Davis, B. Hertzberg, M. K. Prabhu, H. Wijaya, C. Kozyrakis, and K. Olukotun. Transactional memory coherence and consistency. In ISCA 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. T. Harris and K. Fraser. Language support for lightweight transactions. In OOPSLA 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. T. Harris, S. Marlow, S. P. Jones, and M. Herlihy. Composable memory transactions. In PPoPP 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. T. Harris, M. Plesko, A. Shinnar, and D. Tarditi. Optimizing memory transactions. In PLDI 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Intel Corporation. Intel 64 Architecture Memory Ordering White Paper. http://www.intel.com/products/processor/manuals/318147.pdf.Google ScholarGoogle Scholar
  15. L. Lamport. How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Transactions on Computers, 9(29):690--691, 1979. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. J. Larus and R. Rajwar. Transactional Memory. Morgan & Claypool Publishers, 2006.Google ScholarGoogle Scholar
  17. J. Manson, W. Pugh, and S. V. Adve. The Java memory model. In POPL 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. V. Menon, S. Balensiefer, T. Shpeisman, A.-R. Adl-Tabatabai, R. L. Hudson, B. Saha, and A. Welc. Towards a lock-based semantics for Java STM. Technical Report UW-CSE-07-11-01, November 2007.Google ScholarGoogle Scholar
  19. K. E. Moore, J. Bobba, M. J. Moravan, M. D. Hill, and D. A. Wood. LogTM: Log-based transactional memory. In HPCA 2006.Google ScholarGoogle ScholarCross RefCross Ref
  20. K. F. Moore and D. Grossman. High-level small-step operational semantics for transactions. In POPL 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. R. Rajwar, M. Herlihy, and K. Lai. Virtualizing transactional memory. In ISCA 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. T. Shpeisman, V. Menon, A.-R. Adl-Tabatabai, S. Balensiefer, D. Grossman, R. L. Hudson, K. F. Moore, and S. Bratin. Enforcing isolation and ordering in stm. In PLDI 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. M. F. Spear, V. J. Marathe, L. Dalessandro, and M. L. Scott. Brief announcement: Privatization techniques for software transactional memory. In PODC 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. M. F. Spear, V. J. Marathe, L. Dalessandro, and M. L. Scott. Privatization techniques for software transactional memory. Technical Report 915, University of Rochester, Computer Science Dept., 2007.Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. H. Sutter. Prism - A Principle-Based Sequential Memory Model for Microsoft Native Code Platforms Draft Version 0.9.1. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2075.pdf, September 2006.Google ScholarGoogle Scholar
  26. C. Wang, W.-Y. Chen, Y. Wu, B. Saha, and A.-R. Adl-Tabatabai. Code generation and optimization for transactional memory constructs in an unmanaged language. In CGO 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Single global lock semantics in a weakly atomic STM

        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 SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 43, Issue 5
          May 2008
          24 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/1402227
          Issue’s Table of Contents

          Copyright © 2008 Authors

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 1 May 2008

          Check for updates

          Qualifiers

          • research-article

        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!