On the uncontended complexity of consensus

Victor Luchangco*, Mark Moir, Nir Shavit

*Corresponding author for this work

Research output: Chapter in Book/Report/Conference proceedingChapterpeer-review

26 Scopus citations

Abstract

Lock-free algorithms are not required to guarantee a bound on the number of steps an operation takes under contention, so we cannot use the usual worst-case analysis to quantify them. A natural alternative is to consider the worst-case time complexity of operations executed in the more common uncontented case. Many state-of-the-art lock-free algorithms rely on compare-and-swap (CAS) or similar operations with high consensus number to allow effective interprocess coordination. Given the fundamental nature of consensus operations to interprocess coordination, and the fact that instructions such as CAS are usually significantly more costly than simple loads and stores, it seems natural to consider a complexity measure that counts the number of operations with higher consensus number. In this paper we show that, despite its natural appeal, such a measure is not useful. We do so by showing that one can devise a wait-free implementation of the universal compare-and-swap operation, with a "fast path" that requires only a constant number of loads and stores when the CAS is executed without contention, and uses a hardware CAS operation only if there is contention. Thus, at least in theory, any CAS-based algorithm can be transformed into one that does not invoke any CAS operations along its uncontended "fast path", so simply counting the number of such operations invoked in this case is meaningless.

Original languageEnglish
Title of host publicationLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
EditorsFaith Ellen Fich
PublisherSpringer Verlag
Pages45-59
Number of pages15
ISBN (Print)354020184X, 9783540201847
DOIs
StatePublished - 2003

Publication series

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

Fingerprint

Dive into the research topics of 'On the uncontended complexity of consensus'. Together they form a unique fingerprint.

Cite this