Lock-free linked lists using compare-and-swap

Lock-free data structures implement concurrent objects without the use of mutual exclusion. This approach can avoid performance problems due to unpredictable delays while processes are within critical sections. Although universal methods are known that give lock-free data structures for any abstract data type, the overhead of these methods makes them inefficient when compared to conventional techniques using mutual exclusion, such as spin locks. We give lock-free data structures and algorithms for implementing a shared singly-linked list, allowing concurrent traversal, insertion, and deletion by any number of processes. We also show how the basic data structure can be used as a building block for other lock-free data structures. Our algorithms use the single word Compare-and-Swap synchronization primitive to implement the linked list directly, avoiding the overhead of universal methods, and are thus a practical alternative to using spin locks.

[1]  David B. Gustavson The Scalable Coherent Interface and related standards projects , 1992, IEEE Micro.

[2]  W. E. Weihl,et al.  An evaluation of concurrent priority queue algorithms , 1991, Proceedings of the Third IEEE Symposium on Parallel and Distributed Processing.

[3]  Shreekant S. Thakkar,et al.  Synchronization algorithms for shared-memory multiprocessors , 1990, Computer.

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

[5]  Michael L. Scott,et al.  Algorithms for scalable synchronization on shared-memory multiprocessors , 1991, TOCS.

[6]  Nancy A. Lynch,et al.  Impossibility of distributed consensus with one faulty process , 1985, JACM.

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

[8]  Serge A. Plotkin Sticky bits and universality of consensus , 1989, PODC '89.

[9]  Thomas Anderson Operating system support for high-performance multiprocessing , 1992 .

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

[11]  Dennis Shasha,et al.  Locking without blocking: making lock based concurrent data structure algorithms nonblocking , 1992, PODS '92.

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

[13]  Maurice Herlihy,et al.  Lock-Free Garbage Collection for Multiprocessors , 1992, IEEE Trans. Parallel Distributed Syst..

[14]  Maurice Herlihy,et al.  Impossibility and universality results for wait-free synchronization , 1988, PODC '88.

[15]  Edward W. Felten,et al.  Performance issues in non-blocking synchronization on shared-memory multiprocessors , 1992, PODC '92.

[16]  Brian N. Bershad,et al.  Fast mutual exclusion for uniprocessors , 1992, ASPLOS V.

[17]  Edith Schonberg,et al.  Low-overhead scheduling of nested parallelism , 1991, IBM J. Res. Dev..

[18]  Dennis Shasha,et al.  Concurrent set manipulation without locking , 1988, PODS '88.

[19]  Richard L. Sites,et al.  Alpha Architecture Reference Manual , 1995 .

[20]  Calton Pu,et al.  A Lock-Free Multiprocessor OS Kernel , 1992, OPSR.

[21]  Greg Barnes,et al.  A method for implementing lock-free shared-data structures , 1993, SPAA '93.

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

[23]  Maged M. Michael,et al.  Implementation of general-purpose atomic primitives for distributed shared-memory multiprocessors , 1995, HPCA 1995.

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

[25]  Richard J. Anderson,et al.  Wait-free parallel algorithms for the union-find problem , 1991, STOC '91.

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

[27]  William Pugh,et al.  Skip Lists: A Probabilistic Alternative to Balanced Trees , 1989, WADS.

[28]  William Pugh,et al.  Concurrent maintenance of skip lists , 1990 .