Atomic Snapshots in O (n log n) Operations

Hagit Attiya, Ophir Rachman
1998 SIAM journal on computing (Print)  
The atomic snapshot object is an important primitive used for the design and verification of wait-free algorithms in shared-memory distributed systems. A snapshot object is a shared data structure partitioned into segments. Processors can either update an individual segment or instantaneously scan all segments of the object. This paper presents an implementation of an atomic snapshot object in which each high-level operation (scan or update) requires O(n log n) low-level operations on atomic
more » ... d/write registers. Introduction. Wait-free algorithms for shared-memory systems have attracted considerable attention during the past few years. The difficulty of synchronization and communication in such systems caused many of the algorithms that were developed to be quite intricate. A major research effort attempts to simplify the design and verification of efficient wait-free algorithms by defining convenient synchronization primitives and efficiently implementing them. One of the most attractive primitives is the atomic snapshot object introduced in [1, 2, 6]. An atomic snapshot object (in short, snapshot object) is a data structure shared by n processors. The snapshot object is partitioned into n segments, one for each processor. Processors can either update their own segment or instantaneously scan all segments of the object. By employing a snapshot object, processors obtain an instantaneous global picture of the system. This sidesteps the need to rely on "inconsistent" views of the shared memory and reduces the possible interleavings of the low level operations in the execution. Therefore, snapshot objects greatly simplify the design and verification of many wait-free algorithms. An excellent example is provided by comparing the recent proof of a bounded concurrent timestamp algorithm using snapshot objects [15] with the original intricate proof in [10] . Unfortunately, the great conceptual gain of using snapshot objects is often diminished by the actual cost of their implementation; the best snapshot implementation to date requires O(n 2 ) read and write operations on atomic registers [1, 4] . Compared with the cost of simply reading n memory locations, this might seem a high price to pay for modularity and transparency. Thus, significant effort has been spent on avoiding snapshots and constructing algorithms directly from read and write operations. This paper presents a snapshot object implementation in which each update or scan operation requires O(n log n) operations on single-writer multireader atomic reg- *
doi:10.1137/s0097539795279463 fatcat:ktsuqlp5rbgqvpcwoalkwnnwxa