Skip to main content
QUICK REVIEW

[Paper Review] Durable Algorithms for Writable LL/SC and CAS with Dynamic Joining

Prasad Jayanti, Siddhartha Jayanti|arXiv (Cornell University)|Jan 1, 2023
Distributed systems and fault toleranceComputer Science3 citations
TL;DR

This paper presents DuraCAS and DuraLL, the first durable, writable, and ABA-free implementations of CAS and LLSC primitives that support dynamic joining and adaptive space complexity. By leveraging durable ECSC (external context compare-and-swap) objects and handle-based coordination, the algorithms achieve constant-time operations and O(m + n) space complexity, where m is the number of objects and n is the number of active processes, significantly improving on prior O(m + N²) bounds for fixed-N protocols.

ABSTRACT

We present durable implementations for two well known universal primitives -- CAS (compare-and-swap), and its ABA-free counter-part LLSC (load-linked, store-conditional). All our implementations are: writable, meaning they support a Write() operation; have constant time complexity per operation; allow for dynamic joining, meaning newly created processes (a.k.a. threads) of arbitrary names can join a protocol and access our implementations; and have adaptive space complexities, meaning the space use scales in the number of processes $n$ that actually use the objects, as opposed to previous protocols which are designed for a maximum number of processes $N$. Our durable Writable-CAS implementation, DuraCAS, requires $O(m + n)$ space to support $m$ objects that get accessed by $n$ processes, improving on the state-of-the-art $O(m + N^2)$. By definition, LLSC objects must store "contexts" in addition to object values. Our Writable-LLSC implementation, DuraLL, requires $O(m + n + C)$ space, where $C$ is the number of "contexts" stored across all the objects. While LLSC has an advantage over CAS due to being ABA-free, the object definition seems to require additional space usage. To address this trade-off, we define an External Context (EC) variant of LLSC. Our EC Writable-LLSC implementation is ABA-free and has a space complexity of just $O(m + n)$. To our knowledge, we are the first to present durable CAS algorithms that allow for dynamic joining, and our algorithms are the first to exhibit adaptive space complexities. To our knowledge, we are the first to implement any type of durable LLSC objects.

Motivation & Objective

  • To design the first durable, writable CAS and LLSC algorithms that support dynamic joining of processes with arbitrary names.
  • To achieve constant-time operation complexity while minimizing space usage, adapting to the actual number of active processes rather than a predefined maximum.
  • To resolve the space overhead of ABA-free LLSC by introducing an External Context (EC) variant that reduces space complexity to O(m + n) without sacrificing durability or ABA-freedom.
  • To provide a practical foundation for durable concurrent data structures in non-volatile memory (NVM) systems by enabling crash-restart resilience with detectability and recoverability.

Proposed method

  • The DuraCAS algorithm uses two durable ECSC objects (W and Z) per DuraCAS object, with handles (h.Critical and h.Casual) to separate critical and non-critical operations.
  • It employs a handle-based approach where h.Critical is used only for installing writes and imprinting CAS operations that affect object state, enabling detectability.
  • The algorithm distinguishes between visible (state-affecting) and safe-to-repeat (non-affecting) operations by tracking detector values via h.Critical, ensuring detectability.
  • For LLSC, the DuraLL implementation uses a context-aware design where contexts are stored externally via ECSC, reducing space overhead compared to in-object context storage.
  • The EC variant of LLSC stores contexts externally using durable ECSC objects, allowing O(m + n) space complexity instead of O(m + n + C) for traditional LLSC.
  • The design ensures wait-freedom and linearizability by using durable ECSC primitives to coordinate state changes and recovery across crashes.

Experimental results

Research questions

  • RQ1Can durable, writable CAS objects be implemented with dynamic joining and adaptive space complexity?
  • RQ2Can ABA-free LLSC objects be durably implemented for the first time, with minimal space overhead?
  • RQ3How can detectability be achieved in durable CAS and LLSC objects under crash-restart semantics?
  • RQ4What is the minimal space complexity achievable for durable, writable, and ABA-free concurrent objects?
  • RQ5Can the space cost of context storage in LLSC be reduced without compromising durability or ABA-freedom?

Key findings

  • DuraCAS achieves O(m + n) space complexity, where m is the number of DuraCAS objects and n is the number of active processes, improving upon the prior O(m + N²) bound for fixed-N protocols.
  • The DuraLL algorithm for Writable-LLSC requires O(m + n + C) space, where C is the total number of contexts stored, but the EC variant reduces this to O(m + n) by externalizing context storage.
  • The DuraCAS algorithm is detectable: operations that affect object state increase the detector value, while safe-to-repeat operations do not, enabling crash detection.
  • All operations, including Recover, Detect, Constructor, and CreateHandle, are wait-free and run in constant time, ensuring progress regardless of process failures.
  • The algorithms support dynamic joining: new processes can join at any time by creating a handle and accessing existing or new objects without prior coordination.
  • This work presents the first durable implementations of ABA-free LLSC objects, resolving a long-standing gap in durable concurrent object design.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.