Atomic register
An atomic register is a read/write object whose concurrent operations admit a common legal sequential order that respects real-time precedence.
Each read returns the latest value in that common order, starting from the specified initial value. Completed-before-invoked operations retain their order; overlapping operations need not follow response order. This is the register case of linearizability. [2]
Single-writer comparison: when a write changes 0 to 1, two nonoverlapping reads within that write cannot return 1 and then 0, although a regular register permits that history. [1]
Scope: a separate read followed by a write is not one atomic read-modify-write operation. Multi-key transactions, progress guarantees such as wait-freedom, and persistence after a crash need additional contracts. [2] [1]
No response does not mean no effect. A legal history may complete selected pending calls and omit others. If x starts at 0 and a completed read returns 1 while the only write of 1 remains pending, the explanation must retain that write before the read. A timeout response needs its API's own contract. [2]
A retained pending write must follow reads completed before its invocation. With initial 0, a read returning 1 before the sole W(1) starts has no legal explanation. [4]
Relations
- related
- Safe register, Regular register, Linearizability, Compare-and-swap, Durable linearizability, Safety property
Citations
- Lamport. On Interprocess Communication. Part I p. 2, failure exclusion; Part II section 4, pp. 18-21. SRC report, 1985; journal publication, 1986.
- Herlihy and Wing. Linearizability: A Correctness Condition for Concurrent Objects. ACM TOPLAS 12(3), 1990, sections 2.2-2.3, 3.2, 5.1 and 6.2.
- Sela, Herlihy and Petrank. Linearizability: A Typo. arXiv:2105.06737v2 (2021), sections 3.1 and 4.
Further reading
Sources & caveats
- The definition follows the read/write-object specification of Herlihy and Wing; the safe/regular comparison uses Lamport's finite-valued, single-writer scope. No implementation, performance or recovery result is asserted.