Fast and Fair Lock-Free Locks

08/10/2021
by   Naama Ben-David, et al.
0

We present a randomized approach for lock-free locks with strong bounds on time and fairness in a context in which any process can be arbitrarily delayed. Our approach supports a tryLock operation that is given a set of locks, and code to run when all the locks are acquired. Given an upper bound κ known to the algorithm on the point contention for a tryLock it will succeed in acquiring its locks and running the code with probability at least 1/κ. It is thus fair. If the algorithm does not know the bound κ, we present a variant that can guarantee a probability of at least 1/κlogκ of success. Furthermore, if the maximum step complexity for the code in any lock is T, and the point contentions are constant, the attempt will take O(T) steps. The attempts are independent, thus if the tryLock is repeatedly retried on failure, it will succeed in O(T) expected steps, and with high probability in not much more. Importantly, however, retrying is not mandatory, and a process may choose to execute different code upon failure. We assume an oblivious adversarial scheduler, which does not make decisions based on the operations, but can predetermine any schedule for the processes, which is unknown to our algorithm. Furthermore, to account for applications that change their future requests based on the results of previous lock attempts, we strengthen the adversary by allowing decisions of the start times and lock sets of tryLock attempts to be made adaptively, given the history of the execution so far.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
02/11/2019

Efficient Randomized Test-And-Set Implementations

We study randomized test-and-set (TAS) implementations from registers in...
research
05/05/2020

Envy-free cake cutting: A polynomial number of queries with high probability

In this article we propose a probabilistic framework in order to study t...
research
11/03/2021

Fair Mutual Exclusion for N Processes (extended version)

Peterson's mutual exclusion algorithm for two processes has been general...
research
09/12/2018

Constant Amortized RMR Complexity Deterministic Abortable Mutual Exclusion Algorithm for CC and DSM Models

The abortable mutual exclusion problem was introduced by Scott and Scher...
research
06/06/2019

Near Neighbor: Who is the Fairest of Them All?

In this work we study a fair variant of the near neighbor problem. Namel...
research
06/06/2023

Generalized Pseudospectral Shattering and Inverse-Free Matrix Pencil Diagonalization

We present a randomized, inverse-free algorithm for producing an approxi...
research
01/03/2022

Lock-Free Locks Revisited

This paper presents a new and practical approach to lock-free locks base...

Please sign up or login with your details

Forgot password? Click here to reset