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.
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Colin Blundell, E Christopher Lewis, and Milo M. K. Martin. Subtleties of transactional memory atomicity semantics. IEEE Computer Architecture Letters, 5 (2), 2006. Google Scholar
Digital Library
- Dave Dice, Ori Shalev, and Nir Shavit. Transactional locking II. In Proceedings of the 20th International Symposium on Distributed Computing (DISC), 2006. Google Scholar
Digital Library
- Robert Ennals. Software transactional memory should not be obstruction-free. Technical Report IRC-TR-06-052, Intel Research Cambridge Tech Report, Jan 2006.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Vassos Hadzilacos. A theory of reliability in database systems. Journal of the ACM, 35 (1): 121--145, 1988. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- Maurice Herlihy. Wait-free synchronization. ACM Transactions on Programming Languages and Systems, 13 (1): 124--149, January 1991. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Suresh Jagannathan, Jan Vitek, Adam Welc, and Antony Hosking. A transactional object calculus. Science of Computer Programming, 57 (2): 164--186, 2005. Google Scholar
Digital Library
- Prasad Jayanti. Adaptive and efficient abortable mutual exclusion. In Proceedings of the 22nd Annual ACM Symposium on Principles of Distributed Computing (PODC), 2003. Google Scholar
Digital Library
- Leslie Lamport. The mutual exclusion problem-part II: Statement and solutions. Journal of the ACM, 33 (2), 1985. Google Scholar
Digital Library
- Leslie Lamport. On interprocess communication-part II: Algorithms. Distributed Computing, 1 (2), 1986.Google Scholar
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Christos H. Papadimitriou. The serializability of concurrent database updates. Journal of the ACM, 26 (4): 631--653, 1979. Google Scholar
Digital Library
- Michel Raynal. Algorithms for Mutual Exclusion. The MIT Press, 1986. Google Scholar
Digital Library
- Michael L. Scott. Sequential specification of transactional memory semantics. In 1st ACM SIGPLAN Workshop on Transactional Computing (TRANSACT), 2006.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
Index Terms
The semantics of progress in lock-based transactional memory
Recommendations
The semantics of progress in lock-based transactional memory
POPL '09Transactional 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 ...
From lock to correct and efficient software transactional memory
INTERACT-14: Proceedings of the 2010 Workshop on Interaction between Compilers and Computer ArchitectureTransactional memory solves many problems in lock-based parallel programs. Unfortunately, the semantics of transactions are different from those of critical sections defined by locks. The semantic differences make it difficult to correctly port existing ...
On the correctness of transactional memory
PPoPP '08: Proceedings of the 13th ACM SIGPLAN Symposium on Principles and practice of parallel programmingTransactional memory (TM) is perceived as an appealing alternative to critical sections for general purpose concurrent programming. Despite the large amount of recent work on TM implementations, however, very little effort has been devoted to precisely ...







Comments