Reducing Compare-and-Swap to Consensus Number One Primitives
Pankaj Khanchandani, Roger Wattenhofer

TL;DR
This paper demonstrates that compare-and-swap, a strong synchronization primitive, can be efficiently implemented using only weak primitives with consensus number one, maintaining the same asymptotic complexity.
Contribution
It provides an O(1) time wait-free linearizable implementation of compare-and-swap using only consensus number one primitives, reducing the strength needed for synchronization.
Findings
Compare-and-swap can be replaced by weak primitives without efficiency loss.
The implementation is wait-free and linearizable.
Any algorithm using compare-and-swap can be adapted to use only weak primitives.
Abstract
The consensus number of an object is the maximum number of processes among which binary consensus can be solved using any number of instances of the object and read-write registers. Herlihy [6] showed in his seminal work that if an object has a consensus number of n, then there is a universal construction for a wait-free and linearizable implementation of any non-trivial concurrent object or data structure that is shared among n processes. Thus, a synchronization object such as compare-and-swap with an infinite consensus number and the corresponding instruction can be viewed as "strong". On the other hand, a synchronization object such as fetch-and-add with consensus number two and the corresponding fetch-and-add instruction can be viewed as "weak". Ellen et al. [2] observed recently that an object supporting two weak instructions can also achieve infinite consensus number like an…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsDistributed systems and fault tolerance · Interconnection Networks and Systems · Parallel Computing and Optimization Techniques
