Lock-Free and Practical Deques using Single-Word Compare-And-Swap

We present an efficient and practical lock-free implementation of a concurrent deque that is disjoint-parallel accessible and uses atomic primitives which are available in modern computer systems. Previously known lock-free algorithms of deques are either based on non-available atomic synchronization primitives, only implement a subset of the functionality, or are not designed for disjoint accesses. Our algorithm is based on a doubly linked list, and only requires single-word compare-and-swap atomic primitives, even for dynamic memory sizes. We have performed an empirical study using full implementations of the most efficient algorithms of lock-free deques known. For systems with low concurrency, the algorithm by Michael shows the best performance. However, as our algorithm is designed for disjoint accesses, it performs significantly better on systems with high concurrency and non-uniform memory architecture.

[1]  Nir Shavit,et al.  Even Better DCAS-Based Concurrent Deques , 2000, DISC.

[2]  Abraham Silberschatz,et al.  Operating System Concepts , 1983 .

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

[4]  Amos Israeli,et al.  Disjoint-access-parallel implementations of strong shared memory primitives , 1994, PODC '94.

[5]  Maged M. Michael CAS-Based Lock-Free Algorithm for Shared Deques , 2003, Euro-Par.

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

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

[8]  Keir Fraser,et al.  A Practical Multi-word Compare-and-Swap Operation , 2002, DISC.

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

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

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

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

[13]  John David Valois Lock-free data structures , 1996 .

[14]  Nir Shavit,et al.  DCAS-based concurrent deques , 2000, SPAA '00.

[15]  David R. Cheriton,et al.  Non-blocking synchronization and system design , 1999 .

[16]  C. Greg Plaxton,et al.  Thread Scheduling for Multiprogrammed Multiprocessors , 1998, SPAA '98.

[17]  Mark Moir,et al.  DCAS-based concurrent deques supporting bulk allocation , 2002 .