Lock-free Transactions without Rollbacks for Linked Data Structures

Non-blocking data structures allow scalable and thread-safe accesses to shared data. They provide individual operations that appear to execute atomically. However, it is often desirable to execute multiple operations atomically in a transactional manner. Previous solutions, such as software transactional memory (STM) and transactional boosting, manage transaction synchronization in an external layer separated from the data structure's own thread-level concurrency control. Although this reduces programming effort, it leads to overhead associated with additional synchronization and the need to rollback aborted transactions. In this work, we present a new methodology for transforming high-performance lock-free linked data structures into high-performance lock-free transactional linked data structures without revamping the data structures' original synchronization design. Our approach leverages the semantic knowledge of the data structure to eliminate the overhead of false conflicts and rollbacks. We encapsulate all operations, operands, and transaction status in a transaction descriptor, which is shared among the nodes accessed by the same transaction. We coordinate threads to help finish the remaining operations of delayed transactions based on their transaction descriptors. When transaction fails, we recover the correct abstract state by reversely interpreting the logical status of a node. In our experimental evaluation using transactions with randomly generated operations, our lock-free transactional lists and skiplist outperform the transactional boosted ones by 40% on average and as much as 125% for large transactions. They also outperform the alternative STM-based approaches by a factor of 3 to 10 across all scenarios. More importantly, we achieve 4 to 6 orders of magnitude less spurious aborts than the alternatives.

[1]  D. M. Hutton,et al.  The Art of Multiprocessor Programming , 2008 .

[2]  Hagit Attiya The inherent complexity of transactional memory and what to do about it , 2010, PODC '10.

[3]  Mark Moir,et al.  Early experience with a commercial hardware transactional memory implementation , 2009, ASPLOS.

[4]  Rachid Guerraoui,et al.  Composing Relaxed Transactions , 2013, 2013 IEEE 27th International Symposium on Parallel and Distributed Processing.

[5]  Emmett Witchel,et al.  Is transactional programming actually easier? , 2010, PPoPP '10.

[6]  Bratin Saha,et al.  Open nesting in software transactional memory , 2007, PPOPP.

[7]  Rupak Majumdar,et al.  Lock allocation , 2007, POPL '07.

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

[9]  Kunle Olukotun,et al.  Transactional predication: high-performance concurrent sets and maps for STM , 2010, PODC '10.

[10]  Roberto Palmieri,et al.  Integrating Transactionally Boosted Data Structures with STM Frameworks: A Case Study on Set , 2014 .

[11]  Timothy L. Harris,et al.  Lock Inference in the Presence of Large Libraries , 2012, ECOOP.

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

[13]  David Gay,et al.  Autolocker: synchronization inference for atomic sections , 2006, POPL '06.

[14]  Eran Yahav,et al.  Testing atomicity of composed concurrent operations , 2011, OOPSLA '11.

[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]  Nir Shavit,et al.  Software transactional memory , 1995, PODC '95.

[18]  Faith Ellen,et al.  Non-blocking binary search trees , 2010, PODC.

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

[20]  Deli Zhang,et al.  A Lock-Free Priority Queue Design Based on Multi-Dimensional Linked Lists , 2016, IEEE Transactions on Parallel and Distributed Systems.

[21]  Sumit Gulwani,et al.  Inferring locks for atomic sections , 2008, PLDI '08.

[22]  Håkan Grahn,et al.  Transactional memory , 2010, J. Parallel Distributed Comput..

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

[24]  Maurice Herlihy,et al.  Transactional boosting: a methodology for highly-concurrent transactional objects , 2008, PPoPP.

[25]  Maurice Herlihy,et al.  Coarse-grained transactions , 2010, POPL '10.

[26]  Eran Yahav,et al.  Automatic scalable atomicity via semantic locking , 2015, PPoPP.

[27]  Maurice Herlihy,et al.  Transactional Memory: Architectural Support For Lock-free Data Structures , 1993, Proceedings of the 20th Annual International Symposium on Computer Architecture.

[28]  Nir Shavit,et al.  Scalable concurrent priority queue algorithms , 1999, PODC '99.

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

[30]  Virendra J. Marathe,et al.  Design tradeoffs in modern software transactional memory systems , 2004 .

[31]  Maged M. Michael,et al.  High performance dynamic lock-free hash tables and list-based sets , 2002, SPAA '02.

[32]  Bengt Jonsson,et al.  A Skiplist-Based Concurrent Priority Queue with Minimal Memory Contention , 2013, OPODIS.

[33]  Timothy L. Harris,et al.  A Pragmatic Implementation of Non-blocking Linked-Lists , 2001, DISC.

[34]  Rachid Guerraoui,et al.  On the correctness of transactional memory , 2008, PPoPP.

[35]  Christos H. Papadimitriou,et al.  The serializability of concurrent database updates , 1979, JACM.

[36]  Eran Yahav,et al.  Concurrent libraries with foresight , 2013, PLDI.

[37]  Maurice Herlihy,et al.  The Art of Multiprocessor Programming, Revised Reprint , 2012 .

[38]  Roberto Palmieri,et al.  On Developing Optimistic Transactional Lazy Set , 2014, OPODIS.

[39]  David Eisenstat,et al.  Lowering the Overhead of Nonblocking Software Transactional Memory , 2006 .