---
title: "Efficient Synchronization of Multiprocessors with Shared Memory"
authors:
  - "Clyde P. Kruskal"
  - "Larry Rudolph"
  - "Marc Snir"
year: 1988
venue: "ACM Transactions on Programming Languages and Systems 10(4), 579–601, October 1988 (preliminary version in PODC 1986)"
arxiv: null
doi: "10.1145/48022.48024"
source: "https://snir.cs.illinois.edu/listed/J19.pdf"
version_reviewed: "TOPLAS October 1988 journal PDF (23 pages) from Marc Snir's publication list, read in full via the web fetcher (direct curl from the box gets an HTML interstitial)"
topics:
  - "read-modify-write"
  - "combining-networks"
  - "fetch-and-add"
  - "function-composition"
  - "parallel-prefix"
  - "full-empty-bits"
  - "hot-spot-contention"
seed_rank: 2754
seed_batch: "archive-2026-11-30"
reviewed: "2026-11-30"
pool: "systems"
relevance_score: 8
lineage: concurrent-data-structures
cites:
  - title: "Efficient Synchronization of Multiprocessors with Shared Memory"
    url: "https://doi.org/10.1145/48022.48024"
    year: 1988
    arxiv: null
    doi: "10.1145/48022.48024"
  - title: "Efficient synchronization of multiprocessors with shared memory (PODC 1986)"
    url: "https://doi.org/10.1145/10590.10609"
    year: 1986
    arxiv: null
    doi: "10.1145/10590.10609"
  - title: "The NYU Ultracomputer—Designing an MIMD Shared Memory Parallel Computer"
    url: "https://doi.org/10.1109/TC.1983.1676201"
    year: 1983
    arxiv: null
    doi: "10.1109/TC.1983.1676201"
  - title: "Basic Techniques for the Efficient Coordination of Very Large Numbers of Cooperating Sequential Processors"
    url: "https://doi.org/10.1145/69624.357206"
    year: 1983
    arxiv: null
    doi: "10.1145/69624.357206"
  - title: "Parallel Prefix Computation"
    url: "https://doi.org/10.1145/322217.322232"
    year: 1980
    arxiv: null
    doi: "10.1145/322217.322232"
  - title: "Time, Clocks, and the Ordering of Events in a Distributed System"
    url: "https://doi.org/10.1145/359545.359563"
    year: 1978
    arxiv: null
    doi: "10.1145/359545.359563"
  - title: "How to Make a Multiprocessor Computer That Correctly Executes Multiprocess Programs"
    url: "https://doi.org/10.1109/TC.1979.1675439"
    year: 1979
    arxiv: null
    doi: "10.1109/TC.1979.1675439"
see:
  - "785-time-clocks-and-the-ordering-of-events-in-a-distributed-syst"
  - "472-how-to-make-a-multiprocessor-computer-that-correctly-execute"
---

# Efficient Synchronization of Multiprocessors with Shared Memory

## One-sentence takeaway

Treat every atomic memory operation as `RMW(X, f)`: replace X by f(X) and return the old value. Then two requests to the same address can merge in flight into one request carrying f∘g, and the reply splits back into the old value and f(old value). This combining is correct for any family of maps closed under composition with a constant-size encoding and cheap composition. The paper works out that family for load/store/swap, all 16 Boolean fetch-and-θ, affine and Möbius arithmetic, and full/empty bits, and shows that a combining network is an asynchronous parallel prefix over map composition.

## Why it matters here

It answers "which updates can be merged before they reach shared state?" with one test: can the update be written as a map, and is that set of maps a small, closed semigroup? For Anoptic's wait-free buses and job counters, that is the rule behind warp- or subgroup-aggregated atomics, per-thread delta buffers flushed as one atomic, and combining trees for hot counters. Each is safe exactly when the per-thread op folds into a constant-size map. For ano's masked array effects and standing rules, it suggests representing a batch of commands on one column cell as a composed map, for example an affine `(a, b)` pair or a 2-bit Boolean opcode. Conflicting writes then reduce by a scan rather than by locking, and the "old value each writer saw" falls out of the exclusive prefix. These bridges are this card's reading; the paper is about network switches.

## Key ideas

- **RMW formalism.** Load is `RMW(X, id)`, store v is `RMW(X, const_v)`, swap is a store that returns the old value, test-and-set is `RMW(X, const_1)`, and fetch-and-add a is `RMW(X, x ↦ x + a)`. A request is `(id, addr, f)`. At memory, `@addr := f(@addr)` and the old value is returned.
- **Combining at a switch.** When `(id1, addr, f)` meets `(id2, addr, g)`, the switch saves f and forwards `(id1, addr, f∘g)` (f first, then g). The reply `(id1, v)` is answered to request 1 as v and to request 2 as f(v). The paper gives a formal correctness proof under its memory model, assuming a non-overtaking network where replies retrace the request path. Partial or no combining stays correct, so hardware can trade cost against benefit.
- **Tractable semigroups.** A family of maps can be combined if its closure under composition has O(word) encodings and composition and application are in NC. Examples:
  - The 3 × 3 load/store/swap table.
  - The four one-variable Boolean maps {0, 1, x, ¬x}. These are test-and-clear, test-and-set, load and test-and-complement, encoded in 2 bits. They cover all 16 binary Boolean fetch-and-θ, because the second operand is a constant, and extend to n-bit vectors with 2n bits (multiple locking).
  - Affine maps `ax + b`, which compose with two multiplies and an add.
  - Möbius maps `(ax + b)/(cx + d)`, which compose as 2 × 2 matrix products. These cover fetch-and-{+, −, ×, ÷} and their reverses.
  - Fetch-and-min and fetch-and-OR.
- **Full/empty bits.** HEP-style tagged words use load, load-and-clear, store-and-set and store-if-clear-and-set. They close under composition only after adding store-and-clear and store-if-clear-and-clear: six maps with short opcodes, and never more than two store values per combined request. In a queueing variant, i loads and j stores combine into |i − j| + 1 operations.
- **Combining = parallel prefix.** n RMWs on X compute X, f₁(X), f₂(f₁(X)), …, a prefix over map composition. The combining tree is a dataflow version of the Ladner–Fischer prefix network: 2n − 2 − ⌈lg n⌉ nontrivial compositions in 2⌈lg n⌉ − 2 steps if run synchronously. Only the order of combined elements after the first is arbitrary.
- **Numerics.** Reassociation changes overflow and rounding. Fixed-point without division can be made exact with one guard bit, and guard bits contain floating-point error when division is excluded.

## Caveats

This is the theory behind the NYU Ultracomputer and IBM RP3 combining switches, and combining switches never became mainstream hardware, partly because of their cost. The paper itself notes significant extra hardware over plain packet switching. The correctness model assumes a unique reverse path for replies and sequential-consistency-style semantics, not today's relaxed memory models. It does not measure performance; hot-spot results are cited from other papers. Floating-point and Möbius combining are not bit-exact with serial execution. The links to subgroup-aggregated atomics, delta buffers and ano's scan-based effect merging are this card's reading.

## Links

- DOI: https://doi.org/10.1145/48022.48024
- PDF (Marc Snir's publication page, as read): https://snir.cs.illinois.edu/listed/J19.pdf
- ACM PDF: https://dl.acm.org/doi/pdf/10.1145/48022.48024
- PODC 1986 preliminary version: https://doi.org/10.1145/10590.10609
