Why Transactional Memory Should Not Be Obstruction-Free

Transactional memory (TM) is an inherently optimistic abstraction: it allows concurrent processes to execute sequences of shared-data accesses (transactions) speculatively, with an option of aborting them in the future. Early TM designs avoided using locks and relied on non-blocking synchronization to ensure obstruction-freedom: a transaction that encounters no step contention is not allowed to abort. However, it was later observed that obstruction-free TMs perform poorly and, as a result, state-of-the-art TM implementations are nowadays blocking, allowing aborts because of data conflicts rather than step contention. In this paper, we explain this shift in the TM practice theoretically, via complexity bounds. We prove a few important lower bounds on obstruction-free TMs. Then we present a lock-based TM implementation that beats all of these lower bounds. In sum, our results exhibit a considerable complexity gap between non-blocking and blocking TM implementations.

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

[2]  Maurice Herlihy,et al.  Obstruction-free synchronization: double-ended queues as an example , 2003, 23rd International Conference on Distributed Computing Systems, 2003. Proceedings..

[3]  Maurice Herlihy,et al.  Wait-free synchronization , 1991, TOPL.

[4]  Rachid Guerraoui,et al.  The semantics of progress in lock-based transactional memory , 2009, POPL '09.

[5]  Maurice Herlihy,et al.  On the Nature of Progress , 2011, OPODIS.

[6]  Hagit Attiya,et al.  Inherent limitations on disjoint-access parallel implementations of transactional memory , 2009, SPAA '09.

[7]  Keir Fraser,et al.  Practical lock-freedom , 2003 .

[8]  Michel Raynal,et al.  Brief announcement: virtual world consistency: a new condition for STM systems , 2009, PODC '09.

[9]  Hagit Attiya,et al.  Inherent Limitations on Disjoint-Access Parallel Implementations of Transactional Memory , 2010, Theory of Computing Systems.

[10]  Idit Keidar,et al.  On maintaining multiple versions in STM , 2010, PODC.

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

[12]  Rachid Guerraoui,et al.  On obstruction-free transactions , 2008, SPAA '08.

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

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

[15]  Michael F. Spear,et al.  NOrec: streamlining STM by abolishing ownership records , 2010, PPoPP '10.

[16]  Rachid Guerraoui,et al.  Principles of Transactional Memory , 2010, Synthesis Lectures on Distributed Computing Theory.

[17]  Petr Kuznetsov,et al.  On the Cost of Concurrency in Transactional Memory , 2011, OPODIS.

[18]  Rachid Guerraoui,et al.  The complexity of obstruction-free implementations , 2009, JACM.

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

[20]  Rachid Guerraoui,et al.  Laws of order: expensive synchronization in concurrent algorithms cannot be eliminated , 2011, POPL '11.

[21]  Nir Shavit,et al.  On the Inherent Sequentiality of Concurrent Objects , 2012, SIAM J. Comput..

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

[23]  Paul E. McKenney,et al.  Memory Barriers: a Hardware View for Software Hackers , 2010 .

[24]  Sarita V. Adve,et al.  Shared Memory Consistency Models: A Tutorial , 1996, Computer.

[25]  Petr Kuznetsov,et al.  Safety of Deferred Update in Transactional Memory , 2013, 2013 IEEE 33rd International Conference on Distributed Computing Systems.

[26]  Mark Moir,et al.  Towards formally specifying and verifying transactional memory , 2009, Formal Aspects of Computing.

[27]  Cong Wang,et al.  NZTM: nonblocking zero-indirection transactional memory , 2009, SPAA '09.

[28]  Petr Kuznetsov,et al.  On Partial Wait-Freedom in Transactional Memory , 2014, ICDCN.

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