Table of Contents
Fetching ...

Generalized Compare and Swap

Vassos Hadzilacos, Myles Thiessen, Sam Toueg

TL;DR

A natural generalization of the well-known compare-and-swap object is proposed, one that replaces the equality comparison with an arbitrary comparator and a simple wait-free universal construction is presented.

Abstract

In this paper, we first propose a natural generalization of the well-known compare-and-swap object, one that replaces the equality comparison with an arbitrary comparator. We then present a simple wait-free universal construction using this object and prove its correctness.

Generalized Compare and Swap

TL;DR

A natural generalization of the well-known compare-and-swap object is proposed, one that replaces the equality comparison with an arbitrary comparator and a simple wait-free universal construction is presented.

Abstract

In this paper, we first propose a natural generalization of the well-known compare-and-swap object, one that replaces the equality comparison with an arbitrary comparator. We then present a simple wait-free universal construction using this object and prove its correctness.

Paper Structure

This paper contains 7 sections, 17 theorems, 1 equation, 3 figures, 1 algorithm.

Key Result

Lemma 12

Suppose a process $p$'s $R_{p} = (t, r)$ at time $T$ where $r \neq NULL$. For all times $T' \geq T$ if $R_{p}.time = t$ at $T'$ then $R_{p}.response = r$ at $T'$.

Figures (3)

  • Figure 1: Run constructed in the proof of \ref{['claim:stuck_implies_done']} for the case where $p(o_{\min})$ receives false from the GCAS on \ref{['line:g_r_cas']}. implies . & imply . implies . & imply .
  • Figure 2: Run constructed in case 2 in the proof of \ref{['claim:all_in_o_get_out']}. Since the operation $o \in O_<$ is done, $p(o_{\min})$ tries to store $o_{\min}$ into $A{}$. Whether it succeeds or not, $o$ is no longer in $A{}$ after $T$.
  • Figure 3: Run in the proof of \ref{['claim:o_min_always']} after concluding $o$ was stored in $A{}$ at $T > \bar{T}_2$ because \ref{['line:g_a_cas']} returned true for $o$. This is because if \ref{['line:g_a_gcas']} returned true for $o$ then $o \in O_<$ contradicting \ref{['claim:all_in_o_get_out']}.

Theorems & Definitions (49)

  • Definition 2
  • Definition 3
  • Definition 4: Complete at $T$
  • Definition 5: Done at $T$
  • Lemma 12
  • proof
  • Lemma 13
  • proof
  • Lemma 14
  • proof
  • ...and 39 more