Is Compare-and-Swap Really Necessary?

02/12/2018
by   Pankaj Khanchandani, et al.
0

The consensus number of a synchronization primitive, such as compare-and-swap or fetch-and-add, is the maximum number of processes n among which binary consensus can be solved by using read-write registers and registers supporting the synchronization primitive. As per Herlihy's seminal result, any synchronization primitive with consensus number n can be used to construct a wait-free and linearizable implementation of any non-trivial concurrent object or a data structure that is shared among n processes. As the compare-and-swap primitive has infinite consensus number and is widely supported by multi-processors, synchronization tasks have been typically solved using the compare-and-swap synchronization primitive. In this paper, we show that having compare-and-swap as the quintessential synchronization primitive for solving wait-free synchronization is not necessary. It is not necessary as we give an O(1) time wait-free and linearizable implementation of a compare-and-swap register for processes 1,2,...,n using registers that support the two weak synchronization primitives half-max and max-write, each with consensus number one. Thus, any algorithm that uses powerful compare-and-swap registers to solve some arbitrary synchronization problem among processes 1,2,..., n can be transformed into an algorithm that has the same asymptotic time complexity and only uses weak consensus number one primitives.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/31/2023

The Synchronization Power of Auditable Registers

Auditability allows to track all the read operations performed on a regi...
research
02/13/2023

The Synchronization Power (Consensus Number) of Access-Control Objects: The Case of AllowList and DenyList

This article studies the synchronization power of AllowList and DenyList...
research
05/27/2022

When Is Recoverable Consensus Harder Than Consensus?

We study the ability of different shared object types to solve recoverab...
research
04/27/2018

Recoverable Consensus in Shared Memory

Herlihy's consensus hierarchy is one of the most widely cited results in...
research
08/06/2019

Wait-Free Universality of Consensus in the Infinite Arrival Model

In classical asynchronous distributed systems composed of a fixed number...
research
03/02/2020

Concurrent Disjoint Set Union

We develop and analyze concurrent algorithms for the disjoint set union ...
research
04/23/2023

Lock-based or Lock-less: Which Is Fresh?

We examine status updating systems in which time-stamped status updates ...

Please sign up or login with your details

Forgot password? Click here to reset