Time-optimal, space-efficient single-scanner snapshots & multi-scanner snapshots using CAS

  • Authors:
  • Panagiota Fatourou;Nikolaos D. Kallimanis

  • Affiliations:
  • University of Ioannina, Greece;University of Ioannina, Greece

  • Venue:
  • Proceedings of the twenty-sixth annual ACM symposium on Principles of distributed computing
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

Snapshots are fundamental shared objects which provide consistent views of blocks of shared memory. A snapshot object consists of an array of m memory cells and allows processes to execute UPDATES to write new values in any of the snapshot cells, and SCANS to return consistent views of all m cells. An interesting (weaker) form of snapshot with several applications is a single-scanner snapshot which allows to only one process, called scanner, to execute SCANS (UPDATES can still be executed concurrently). We present the first time-optimal, single-scanner snapshot implementations from read-write registers for an asynchronous system of n processes. Our first algorithmis very simple and has time complexity O(1) for UPDATE and O(m) for SCAN, which is optimal. However, in systems with no garbage collector, the number of registers it uses is proportional to the number of executed SCANS. Our second implementation employs an interesting recycling technique to reduce the space complexity to O(mn) bounded-size registers still achieving optimal time complexities for both operations. These algorithms are simple and practical, and improve upon all previous algorithms in terms of time and space complexity. For systems that provide stronger primitives, like Compare-And-Swap (CAS), we provide a multi-scanner snapshot implementation that uses m+1 CAS registers and m read-write registers, and has time complexity O(1)for UPDATE and O(m) for SCAN.