LL/SC and Atomic Copy: Constant Time, Space Efficient Implementations using only pointer-width CAS

11/21/2019
by   Guy E. Blelloch, et al.
0

The Load-Link/Store-Conditional (LL/SC) primitive is considered the most suitable for implementing lock-free algorithms and data structures. However, the full semantics of LL/SC are not supported by any modern machine, so there has been a significant amount of work on simulations of LL/SC using Compare and Swap (CAS), a synchronization primitive that enjoys widespread hardware support. However, all of the algorithms so far that are constant time either use unbounded sequence numbers (and thus base objects of unbounded size), or require Ω(MP) space for M LL/SC object (where P is the number of processes). We present a constant time implementation of M LL/SC objects using only Θ(M+P^2) space and requiring only pointer-sized CAS objects. Our implementation can also be used to implement L-word LL/SC objects in Θ(L) time (for both LL and SC) and Θ((M+P^2)L) space. We focus on the setting where each process can have at most one LL/SC pair at a time. To support k overlapping LL/SC pairs per process, our algorithms incur an extra factor of k in their space usage. To achieve these bounds, we begin by implementing a new primitive called Single-Writer Copy which takes a pointer to a word sized memory location and atomically copies its contents into another memory location. The only restriction is that the destination of the copy must be single-writer, which means that only one process is allowed to write/copy into it. We believe this primitive will be very useful in designing other concurrent algorithms as well.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
01/31/2023

Durable Algorithms for Writable LL/SC and CAS with Dynamic Joining

We present durable implementations for two well known universal primitiv...
research
07/19/2022

Implementing and Breaking Load-Link / Store-Conditional on an ARM-Based System

Manufacturers of modern electronic devices are constantly attempting to ...
research
02/17/2020

Concurrent Reference Counting and Resource Management in Wait-free Constant Time

A common problem when implementing concurrent programs is efficiently pr...
research
06/23/2021

MAGE: Nearly Zero-Cost Virtual Memory for Secure Computation

Secure Computation (SC) is a family of cryptographic primitives for comp...
research
03/04/2022

Homomorphically Encrypted Computation using Stochastic Encodings

Homomorphic encryption (HE) is a privacy-preserving technique that enabl...
research
07/08/2022

Copy Propagation subsumes Constant Propagation

Constant propagation and copy propagation are code transformations that ...
research
05/20/2019

Hyaline: Fast and Transparent Lock-Free Memory Reclamation

We present a new lock-free safe memory reclamation algorithm, Hyaline, w...

Please sign up or login with your details

Forgot password? Click here to reset