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

The semantics of progress in lock-based transactional memory

Published:21 January 2009Publication History

ABSTRACT

Transactional memory (TM) is a promising paradigm for concurrent programming. Whereas the number of TM implementations is growing, however, little research has been conducted to precisely define TM semantics, especially their progress guarantees. This paper is the first to formally define the progress semantics of lockbased TMs, which are considered the most effective in practice.

We use our semantics to reduce the problems of reasoning about the correctness and computability power of lock-based TMs to those of simple try-lock objects. More specifically, we prove that checking the progress of any set of transactions accessing an arbitrarily large set of shared variables can be reduced to verifying a simple property of each individual (logical) try-lock used by those transactions. We use this theorem to determine the correctness of state-of-the-art lock-based TMs and highlight various configuration ambiguities. We also prove that lock-based TMs have consensus number 2. This means that, on the one hand, a lock-based TM cannot be implemented using only read-write memory, but, on the other hand, it does not need very powerful instructions such as the commonly used compare-and-swap.

We finally use our semantics to formally capture an inherent trade-off in the performance of lock-based TM implementations. Namely, we show that the space complexity of every lock-based software TM implementation that uses invisible reads is at least exponential in the number of objects accessible to transactions.

References

  1. Mart'ın Abadi, Andrew Birrell, Tim Harris, and Michael Isard. Semantics of transactional memory and automatic mutual exclusion. In Proceedings of the 35th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), 2008. 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 Proceedings of the ACM SIGPLAN 2006 Conference on Programming Language Design and Implementation (PLDI), 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Colin Blundell, E Christopher Lewis, and Milo M. K. Martin. Subtleties of transactional memory atomicity semantics. IEEE Computer Architecture Letters, 5 (2), 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Dave Dice, Ori Shalev, and Nir Shavit. Transactional locking II. In Proceedings of the 20th International Symposium on Distributed Computing (DISC), 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Robert Ennals. Software transactional memory should not be obstruction-free. Technical Report IRC-TR-06-052, Intel Research Cambridge Tech Report, Jan 2006.Google ScholarGoogle Scholar
  6. Kapali P. Eswaran, Jim N. Gray, Raymond A. Lorie, and Irving L. Traiger. The notions of consistency and predicate locks in a database system. Commun. ACM, 19 (11): 624--633, 1976. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Pascal Felber, Torvald Riegel, and Christof Fetzer. Dynamic performance tuning of word-based software transactional memory. In Proceedings of the 13th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP), Feb 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Rachid Guerraoui and Michał Kapałka. On the correctness of transactional memory. In Proceedings of the 13th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP), 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Rachid Guerraoui and Michał Kapałka. The semantics of progress in lock-based transactional memory. Technical Report LPD-REPORT-2008-015, EPFL, October 2008.Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Rachid Guerraoui and Michał Kapałka. On obstruction-free transactions. In Proceedings of the 20th ACM Symposium on Parallelism in Algorithms and Architectures (SPAA). ACM, June 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Rachid Guerraoui, Thomas Henzinger, Barbara Jobstmann, and Vasu Singh. Model checking transactional memories. In Proceedings of the ACM SIGPLAN 2008 Conference on Programming Language Design and Implementation (PLDI), 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Vassos Hadzilacos. A theory of reliability in database systems. Journal of the ACM, 35 (1): 121--145, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Tim Harris, Mark Plesko, Avraham Shinnar, and David Tarditi. Optimizing memory transactions. In Proceedings of the ACM SIGPLAN 2006 Conference on Programming Language Design and Implementation (PLDI), 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Maurice Herlihy. Wait-free synchronization. ACM Transactions on Programming Languages and Systems, 13 (1): 124--149, January 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Maurice Herlihy and J. Eliot B. Moss. Transactional memory: Architectural support for lock-free data structures. In Proceedings of the 20th Annual International Symposium on Computer Architecture, pages 289--300, May 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Maurice Herlihy and Jeannette M. Wing. Linearizability: a correctness condition for concurrent objects. ACM Transactions on Programming Languages and Systems, 12 (3): 463--492, June 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. 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
  18. Prasad Jayanti. Adaptive and efficient abortable mutual exclusion. In Proceedings of the 22nd Annual ACM Symposium on Principles of Distributed Computing (PODC), 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Leslie Lamport. The mutual exclusion problem-part II: Statement and solutions. Journal of the ACM, 33 (2), 1985. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Leslie Lamport. On interprocess communication-part II: Algorithms. Distributed Computing, 1 (2), 1986.Google ScholarGoogle Scholar
  21. Virendra J. Marathe, Michael F. Spear, Christopher Heriot, Athul Acharya, David Eisenstat, William N. Scherer III, and Michael L. Scott. Lowering the overhead of software transactional memory. In 1st ACM SIGPLAN Workshop on Transactional Computing (TRANSACT), Jun 2006.Google ScholarGoogle Scholar
  22. Vijay Menon, Steven Balensiefer, Tatiana Shpeisman, Ali-Reza Adl-Tabatabai, Richard L. Hudson, Bratin Saha, and Adam Welc. Practical weak-atomicity semantics for java stm. In Proceedings of the 20th Annual Symposium on Parallelism in Algorithms and Architectures (SPAA), 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Katherine F. Moore and Dan Grossman. High-level small-step operational semantics for transactions. In Proceedings of the 35th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Christos H. Papadimitriou. The serializability of concurrent database updates. Journal of the ACM, 26 (4): 631--653, 1979. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Michel Raynal. Algorithms for Mutual Exclusion. The MIT Press, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Michael L. Scott. Sequential specification of transactional memory semantics. In 1st ACM SIGPLAN Workshop on Transactional Computing (TRANSACT), 2006.Google ScholarGoogle Scholar
  27. Michael L. Scott and William N. Scherer III. Scalable queue-based spin locks with timeout. In Proceedings of the 8th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP), 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Jan Vitek, Suresh Jagannathan, Adam Welc, and Antony Hosking. A semantic framework for designer transactions. In Proceedings of the European Symposium on Programming (ESOP), March 2004.Google ScholarGoogle ScholarCross RefCross Ref

Index Terms

  1. The semantics of progress in lock-based transactional memory

        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!