ResearchTrend.AI
  • Papers
  • Communities
  • Events
  • Blog
  • Pricing
Papers
Communities
Social Events
Terms and Conditions
Pricing
Parameter LabParameter LabTwitterGitHubLinkedInBlueskyYoutube

© 2025 ResearchTrend.AI, All rights reserved.

  1. Home
  2. Papers
  3. 2108.04520
42
0
v1v2 (latest)

Fast and Fair Lock-Free Locks

10 August 2021
N. Ben-David
G. Blelloch
    FaMLLRM
ArXiv (abs)PDFHTML
Abstract

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 κ\kappaκ 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/κ1/\kappa1/κ. It is thus fair. If the algorithm does not know the bound κ\kappaκ, we present a variant that can guarantee a probability of at least 1/κlog⁡κ1/\kappa\log\kappa1/κlogκ of success. Furthermore, if the maximum step complexity for the code in any lock is TTT, and the point contentions are constant, the attempt will take O(T)O(T)O(T) steps. The attempts are independent, thus if the tryLock is repeatedly retried on failure, it will succeed in O(T)O(T)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.

View on arXiv
Comments on this paper