A method for implementing lock-free shared-data structures

We are interested in implementing data structures on shared memory multiprocessors. A natural model for these machines is an asynchronous parallel machine, in which the processors are subject to arbitrary delays. On such machines, it is desuable for algorithms to be loclc-free, that is, they must allow concurrent access to data without using mutual exclusion. Eflicient lock-free implementations are known ror some specific data structures, but these algorithms do not generalize weIl to other structures. For most data structures, the only previously known lock-free algorithm is due to Herlihy [12]. Herlihy presents a simple methodology to create a lock-free implementation of a general data structure, but his approach can be very expensive. We present a technique that provides the semantics of exclusive access to data without using mutual exclusion. Using this technique, we devise the caching method, a general method of implementing lock-free data structures that is provably bett er than Herlihy's methodology for many weIl-known data structures. The cost of one operation using the caching method is proportional to TlogT, where T is the sequential cost of the operation. Under Herlihy's methodology, the cost is proportional to T + C, where C is the time needed to make a logical copy of the data structure. For many data struetures, such as arrays and weil connected pointer-based structures (e.g., a doubly linked list), the best known value for Cis proportional to the size ofthe structure, making the copying time much larger than the sequential cost of an operation. The new method can also allow concurrent updates to the data structurej Herlihy's methodology cannot. A correct lock-free implementation can be derived from a correct sequential implementation in a straightforward manner using this method. The method is also fiexiblej a programmer can change many of the details of the default implementation to optimize for a particular pattern of data structure use.

[1]  Leslie Lamport,et al.  "Sometime" is sometimes "not never": on the temporal logic of programs , 1980, POPL '80.

[2]  Leslie Lamport,et al.  Specifying Concurrent Program Modules , 1983, TOPL.

[3]  Maurice Herlihy,et al.  Axioms for concurrent objects , 1987, POPL '87.

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

[5]  Alexander A. Shvartsman,et al.  Efficient parallel algorithms can be made robust , 1989, PODC '89.

[6]  Phillip B. Gibbons A more practical PRAM model , 1989, SPAA '89.

[7]  Richard Cole,et al.  The APRAM: incorporating asynchrony into the PRAM model , 1989, SPAA '89.

[8]  R. Subramonian,et al.  Asynchronous PRAMs are (almost) as good as synchronous PRAMs , 1990, Proceedings [1990] 31st Annual Symposium on Foundations of Computer Science.

[9]  Naomi Nishimura,et al.  Asynchronous shared memory parallel computation , 1990, SPAA '90.

[10]  Richard Cole,et al.  The expected advantage of asynchrony , 1990, SPAA '90.

[11]  Richard J. Anderson Parallel algorithms for generating random permutations on a shared memory machine , 1990, SPAA '90.

[12]  Maurice Herlihy,et al.  A methodology for implementing highly concurrent data structures , 1990, PPOPP '90.

[13]  Paul G. Spirakis,et al.  Efficient robust parallel computations , 2018, STOC '90.

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

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

[16]  Henry Massalin,et al.  Synthesis: an efficient implementation of fundamental operating system services , 1992 .

[17]  Greg Barnes Wait-Free Algorithms for Heaps , 1992 .

[18]  Maurice Herlihy,et al.  A Methodology for Implementing Highly Concurrent Data Objects , 1992, OPSR.

[19]  Richard J. Anderson Primitives for asynchronous list compression , 1992, SPAA '92.

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

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