A lazy concurrent list-based set algorithm

Steve Heller*, Maurice Herlihy, Victor Luchangco, Mark Moir, William N. Scherer, Nir Shavit

*Corresponding author for this work

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

List-based implementations of sets are a fundamental building block of many concurrent algorithms. A skiplist based on the lock-free list-based set algorithm of Michael will be included in the Java™ Concurrency Package of JDK 1.6.0. However, Michael's lock-free algorithm has several drawbacks, most notably that it requires all list traversal operations, including membership tests, to perform cleanup operations of logically removed nodes, and that it uses the equivalent of an atomicaUy markable reference, a pointer that can be atomically "marked," which is expensive in some languages and unavailable in others. We present a novel "lazy" list-based implementation of a concurrent set object. It is based on an optimistic locking scheme for inserts and removes, eliminating the need to use the equivalent of an atomically markable reference. It also has a novel wait-free membership test operation (as opposed to Michael's lock-free one) that does not need to perform cleanup operations and is more efficient than that of all previous algorithms. Empirical testing shows that the new lazy-list algorithm consistently outperforms all known algorithms, including Michael's lock-free algorithm, throughout the concurrency range. At high load, with 90% membership tests, the lazy algorithm is more than twice as fast as Michael's. This is encouraging given that typical search structure usage patterns include around 90% membership tests. By replacing the lock-free membership test of Michael's algorithm with our new wait-free one, we achieve an algorithm that slightly outperforms our new lazy-list (though it may not be as efficient in other contexts as it uses Java's RTTI mechanism to create pointers that can be atomically marked).

Original languageEnglish
Title of host publicationPrinciples of Distributed Systems - 9th International Conference, OPODIS 2005, Revised Selected Papers
Pages3-16
Number of pages14
DOIs
StatePublished - 2006
Externally publishedYes
Event9th International Conference on Principles of Distributed Systems, OPODIS 2005 - Pisa, Italy
Duration: 12 Dec 200514 Dec 2005

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume3974 LNCS
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Conference

Conference9th International Conference on Principles of Distributed Systems, OPODIS 2005
Country/TerritoryItaly
CityPisa
Period12/12/0514/12/05

Fingerprint

Dive into the research topics of 'A lazy concurrent list-based set algorithm'. Together they form a unique fingerprint.

Cite this