Solving the At-Most-Once Problem with Nearly Optimal Effectiveness
We present and analyze a wait-free deterministic algorithm for solving the at-most-once problem: how m shared-memory fail-prone processes perform asynchronously n jobs at most once. Our algorithmic strategy provides for the first time nearly optimal effectiveness, which is a measure that expresses the total number of jobs completed in the worst case. The effectiveness of our algorithm equals n-2m+2. This is up to an additive factor of m close to the known effectiveness upper bound n-m+1 over all possible algorithms and improves on the previously best known deterministic solutions that have effectiveness only n-log m o(n). We also present an iterative version of our algorithm that for any $m = O\left(\sqrt[3+\epsilon]{n/\log n}\right)$ is both effectiveness-optimal and work-optimal, for any constant $\epsilon > 0$. We then employ this algorithm to provide a new algorithmic solution for the Write-All problem which is work optimal for any $m=O\left(\sqrt[3+\epsilon]{n/\log n}\right)$.
💡 Research Summary
The paper addresses the classic at‑most‑once problem in asynchronous shared‑memory systems, where m crash‑prone processes must execute a set of n jobs without any job being performed more than once. Prior deterministic solutions achieved only a modest effectiveness of n − log m·o(n), far from the theoretical upper bound of n − m + 1, especially when m is large. The authors introduce a two‑stage approach that dramatically improves both effectiveness and work complexity while using only atomic read/write registers.
The first stage is the KKβ algorithm, parameterized by a value β ≥ m. Each process scans the job index space, atomically “claims” the first unclaimed job it encounters, and records a permanent marker to prevent other processes from re‑claiming it. When β = m, the algorithm guarantees that at least n − 2m + 2 jobs are completed in the worst case, which is within an additive m of the optimal bound n − f (where f ≤ m − 1 is the number of crashes). KKβ is wait‑free: even if some processes crash, the remaining ones continue without blocking. The work cost of KKβ is O(n m log n log m) when β ≥ 3m², which is higher than earlier O(n log m) solutions but serves as a building block for the next stage.
The second stage, called IterativeKK(ε), repeatedly invokes KKβ in a series of rounds. In each round the set of unfinished jobs is recomputed, and β is fixed to 3m². By carefully controlling the number of rounds and the size of the unfinished set, the authors achieve an overall work complexity of O(n + m^{3+ε} log n) for any constant ε > 0. Moreover, the effectiveness becomes n − O(m² log n log m), which for m = O(n^{1/(3+ε)}/log n) simplifies to n − O(m), i.e., asymptotically optimal. This range of m covers a substantial fraction of realistic system sizes, and the algorithm remains deterministic and worst‑case optimal.
A major application presented is the Write‑All problem, where each of the n memory cells must be written at least once. Existing deterministic Write‑All algorithms either rely on stronger primitives such as test‑and‑set or achieve super‑linear work (e.g., O(n + m⁴ log n)). By plugging IterativeKK(ε) into a straightforward reduction, the authors obtain WA‑IterativeKK(ε), a deterministic algorithm that solves Write‑All with work O(n + m^{3+ε} log n) using only read/write registers. This improves upon prior work by expanding the range of m for which linear‑ish work is possible (previously limited to m = O(n^{1/4}) or similar) and by eliminating the need for non‑standard atomic instructions.
The paper also surveys related literature, connecting the at‑most‑once problem to at‑most‑once message delivery, RPC semantics, consensus, semi‑matching, and process renaming. It discusses the strong variant of the problem, which requires adaptivity to the actual number of participating processes, and notes that this variant has consensus number 2, precluding wait‑free deterministic solutions in the plain read/write model.
In conclusion, the authors deliver the first deterministic wait‑free algorithm for the at‑most‑once problem whose effectiveness is within an additive m of the optimal bound, and they provide an iterative refinement that is both effectiveness‑optimal and work‑optimal for a broad class of system sizes. Their techniques yield a new deterministic, work‑optimal solution to the Write‑All problem without relying on test‑and‑set, thereby advancing both the theory and practical applicability of safe task allocation in fault‑tolerant shared‑memory multiprocessors.
Comments & Academic Discussion
Loading comments...
Leave a Comment