Efficient and Reliable Lock-Free Memory Reclamation Based on Reference Counting

We present an efficient and practical lock-free method for semiautomatic (application-guided) memory reclamation based on reference counting, aimed for use with arbitrary lock-free dynamic data structures. The method guarantees the safety of local as well as global references, supports arbitrary memory reuse, uses atomic primitives that are available in modern computer systems, and provides an upper bound on the amount of memory waiting to be reclaimed. To the best of our knowledge, this is the first lock-free method that provides all of these properties. We provide analytical and experimental study of the method. The experiments conducted have shown that the method can also provide significant performance improvements for lock-free algorithms of dynamic data structures that require strong memory management.

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

[2]  Pramod G. Joisha Overlooking roots: a framework for making nondeferred reference-counting garbage collection fast , 2007, ISMM '07.

[3]  Maurice Herlihy,et al.  The Repeat Offender Problem: A Mechanism for Supporting Dynamic-Sized, Lock-Free Data Structures , 2002, DISC.

[4]  Dimitrios S. Nikolopoulos,et al.  Scalable locality-conscious multithreaded memory allocation , 2006, ISMM '06.

[5]  Maurice Herlihy,et al.  A methodology for implementing highly concurrent data objects , 1993, TOPL.

[6]  Jan Friso Groote,et al.  Wait-free concurrent memory management by Create and Read until Deletion (CaRuD) , 2001, Distributed Computing.

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

[8]  Mark Moir Practical implementations of non-blocking synchronization primitives , 1997, PODC '97.

[9]  John D. Valois Implementing Lock-Free Queues , 1994 .

[10]  Maurice Herlihy,et al.  Dynamic-sized lockfree data structures , 2002 .

[11]  George E. Collins,et al.  A method for overlapping and erasure of lists , 1960, CACM.

[12]  Prasad Jayanti A Complete and Constant Time Wait-Free Implementation of CAS from LL/SC and Vice Versa , 1998, DISC.

[13]  Maged M. Michael Scalable lock-free dynamic memory allocation , 2004, PLDI '04.

[14]  Leslie Lamport,et al.  Concurrent reading and writing , 1977, Commun. ACM.

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

[16]  Mark Moir,et al.  Lock-free reference counting , 2002, PODC '01.

[17]  Philippas Tsigas,et al.  Lock-Free and Practical Doubly Linked List-Based Deques Using Single-Word Compare-and-Swap , 2004, OPODIS.

[18]  Philippas Tsigas,et al.  NOBLE : A Non-Blocking Inter-Process Communication Library , 2002 .

[19]  Marina Papatriantafilou,et al.  Allocating Memory in a Lock-Free Manner , 2005, ESA.

[20]  Maurice Herlihy,et al.  Dynamic-sized lock-free data structures , 2002, PODC '02.

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

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

[23]  Jeffrey M. Barth Shifting garbage collection overhead to compile time , 1977, CACM.

[24]  Håkan Sundell,et al.  Efficient and Practical Non-Blocking Data Structures , 2004 .

[25]  Benjamin Goldberg,et al.  Reference escape analysis: optimizing reference counting based on the lifetime of references , 1991, PEPM '91.

[26]  Philippas Tsigas,et al.  Practical and Lock-Free Doubly Linked Lists , 2007, PDPTA.

[27]  Maged M. Michael Safe memory reclamation for dynamic lock-free objects using atomic reads and writes , 2002, PODC '02.

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

[29]  Nir Shavit,et al.  The Baskets Queue , 2007, OPODIS.

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

[31]  Daniel G. Bobrow,et al.  An efficient, incremental, automatic garbage collector , 1976, CACM.

[32]  Philippas Tsigas,et al.  Lock-Free and Practical Deques using Single-Word Compare-And-Swap , 2004, ArXiv.