Automatic memory reclamation for lock-free data structures

Lock-free data-structures are widely employed in practice, yet designing lock-free memory reclamation for them is notoriously difficult. In particular, all known lock-free reclamation schemes are ``manual'' in the sense that the developer has to specify when nodes have retired and may be reclaimed. Retiring nodes adequately is non-trivial and often requires the modification of the original lock-free algorithm. In this paper we present an automatic lock-free reclamation scheme for lock-free data-structures in the spirit of a mark-sweep garbage collection. The proposed algorithm works with any normalized lock-free algorithm and with no need for the programmer to retire nodes or make changes to the algorithm. Evaluation of the proposed scheme on a linked-list and a hash table shows that it performs similarly to the best manual (lock-free) memory reclamation scheme.

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

[2]  Maged M. Michael Hazard pointers: safe memory reclamation for lock-free objects , 2004, IEEE Transactions on Parallel and Distributed Systems.

[3]  Filip Pizlo,et al.  Stopless: a real-time garbage collector for multiprocessors , 2007, ISMM '07.

[4]  Mark Moir,et al.  Lock-free reference counting , 2002 .

[5]  J. Eliot B. Moss,et al.  Sapphire: copying GC without stopping the world , 2001, JGI '01.

[6]  Filip Pizlo,et al.  A study of concurrent real-time garbage collectors , 2008, PLDI '08.

[7]  Joshua S. Auerbach,et al.  Tax-and-spend: democratic scheduling for real-time garbage collection , 2008, EMSOFT '08.

[8]  Erez Petrank Can parallel data structures rely on automatic memory managers? , 2012, MSPC '12.

[9]  John D. Valois Lock-free linked lists using compare-and-swap , 1995, PODC '95.

[10]  Jonathan Walpole,et al.  Performance of memory reclamation for lockless synchronization , 2007, J. Parallel Distributed Comput..

[11]  Erez Petrank,et al.  A practical wait-free simulation for lock-free data structures , 2014, PPoPP '14.

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

[13]  Jan Vitek,et al.  Schism: fragmentation-tolerant real-time garbage collection , 2010, PLDI '10.

[14]  Erez Petrank,et al.  Wait-free queues with multiple enqueuers and dequeuers , 2011, PPoPP '11.

[15]  Erez Petrank,et al.  Efficient Memory Management for Lock-Free Data Structures with Optimistic Access , 2015, SPAA.

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

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

[18]  Erez Petrank,et al.  Drop the anchor: lightweight memory management for non-blocking data structures , 2013, SPAA.

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

[20]  Erez Petrank,et al.  A methodology for creating fast wait-free data structures , 2012, PPoPP '12.

[21]  Håkan Sundell Wait-free reference counting and memory management , 2005, 19th IEEE International Parallel and Distributed Processing Symposium.

[22]  Dan Alistarh,et al.  StackTrack: an automated transactional approach to concurrent memory reclamation , 2014, EuroSys '14.

[23]  Maurice Herlihy,et al.  Nonblocking memory management support for dynamic-sized data structures , 2005, TOCS.

[24]  Peter Sewell,et al.  A Better x86 Memory Model: x86-TSO , 2009, TPHOLs.

[25]  Maged M. Michael,et al.  Correction of a Memory Management Method for Lock-Free Data Structures , 1995 .

[26]  Maurice Herlihy,et al.  Lock-free garbage collection for multiprocessors , 1991, SPAA '91.