Time-Based Software Transactional Memory

Software transactional memory (STM) is a concurrency control mechanism that is widely considered to be easier to use by programmers than other mechanisms such as locking. The first generations of STMs have either relied on visible read designs, which simplify conflict detection while pessimistically ensuring a consistent view of shared data to the application, or optimistic invisible read designs that are significantly more efficient but require incremental validation to preserve consistency, at a cost that increases quadratically with the number of objects read in a transaction. Most of the recent designs now use a “time-based” (or “time stamp-based”) approach to still benefit from the performance advantage of invisible reads without incurring the quadratic overhead of incremental validation. In this paper, we give an overview of the time-based STM approach and discuss its benefits and limitations. We formally introduce the first time-based STM algorithm, the Lazy Snapshot Algorithm (LSA). We study its semantics and the impact of its design parameters, notably multiversioning and dynamic snapshot extension. We compare it against other classical designs and we demonstrate that its performance is highly competitive, both for obstruction-free and lock-based STM designs.

[1]  Nir Shavit,et al.  What Really Makes Transactions Faster , 2006 .

[2]  William N. Scherer,et al.  Contention Management in Dynamic Software Transactional Memory ∗ , 2004 .

[3]  Kunle Olukotun,et al.  An effective hybrid transactional memory system with strong isolation guarantees , 2007, ISCA '07.

[4]  Rachid Guerraoui,et al.  Polymorphic Contention Management , 2005, DISC.

[5]  Torvald Riegel,et al.  From causal to z-linearizable transactional memory , 2007, PODC '07.

[6]  Adam Welc,et al.  Design and implementation of transactional constructs for C/C++ , 2008, OOPSLA '08.

[7]  Rui Zhang,et al.  Commit phase in timestamp-based stm , 2008, SPAA '08.

[8]  Virendra J. Marathe,et al.  Adaptive Software Transactional Memory , 2005, DISC.

[9]  Bratin Saha,et al.  McRT-STM: a high performance software transactional memory system for a multi-core runtime , 2006, PPoPP '06.

[10]  Mark Plesko,et al.  Optimizing memory transactions , 2006, PLDI '06.

[11]  William N. Scherer,et al.  Advanced contention management for dynamic software transactional memory , 2005, PODC '05.

[12]  Nir Shavit,et al.  Software transactional memory , 1995, PODC '95.

[13]  Rachid Guerraoui,et al.  Toward a theory of transactional contention managers , 2005, PODC '05.

[14]  Torvald Riegel,et al.  Time-based transactional memory with scalable time bases , 2007, SPAA '07.

[15]  Maurice Herlihy,et al.  Linearizability: a correctness condition for concurrent objects , 1990, TOPL.

[16]  Maurice Herlihy,et al.  Software transactional memory for dynamic-sized data structures , 2003, PODC '03.

[17]  Michael F. Spear,et al.  Conflict Detection and Validation Strategies for Software Transactional Memory , 2006, DISC.

[18]  Bratin Saha,et al.  Code Generation and Optimization for Transactional Memory Constructs in an Unmanaged Language , 2007, International Symposium on Code Generation and Optimization (CGO'07).

[19]  Nir Shavit,et al.  Transactional Locking II , 2006, DISC.

[20]  Robert Ennals Software Transactional Memory Should Not Be Obstruction-Free , 2005 .

[21]  Torvald Riegel,et al.  A Lazy Snapshot Algorithm with Eager Validation , 2006, DISC.

[22]  Torvald Riegel,et al.  Snapshot Isolation for Software Transactional Memory , 2006 .

[23]  U. Aydonat Serializability of Transactions in Software Transactional Memory , 2008 .

[24]  Jim Gray,et al.  A critique of ANSI SQL isolation levels , 1995, SIGMOD '95.

[25]  L. Alvisi,et al.  Lock-free Serializable Transactions , 2006 .