Long-lived counters with polylogarithmic amortized step complexity

Mirza Ahad Baig, Danny Hendler, Alessia Milani, Corentin Travers

Research output: Contribution to journalArticlepeer-review

Abstract

A shared-memory counter is a widely-used and well-studied concurrent object. It supports two operations: An Inc operation that increases its value by 1 and a Read operation that returns its current value. In Jayanti et al (SIAM J Comput, 30(2), 2000), Jayanti, Tan and Toueg proved a linear lower bound on the worst-case step complexity of obstruction-free implementations, from read-write registers, of a large class of shared objects that includes counters. The lower bound leaves open the question of finding counter implementations with sub-linear amortized step complexity. In this work, we address this gap. We show that n-process, wait-free and linearizable counters can be implemented from read-write registers with O(log 2n) amortized step complexity. This is the first counter algorithm from read-write registers that provides sub-linear amortized step complexity in executions of arbitrary length. Since a logarithmic lower bound on the amortized step complexity of obstruction-free counter implementations exists, our upper bound is within a logarithmic factor of the optimal. The worst-case step complexity of the construction remains linear, which is optimal. This is obtained thanks to a new max register construction with O(log n) amortized step complexity in executions of arbitrary length in which the value stored in the register does not grow too quickly. We then leverage an existing counter algorithm by Aspnes, Attiya and Censor-Hillel [1] in which we “plug” our max register implementation to show that it remains linearizable while achieving O(log 2n) amortized step complexity.

Original languageAmerican English
Pages (from-to)29-43
Number of pages15
JournalDistributed Computing
Volume36
Issue number1
DOIs
StatePublished - 1 Mar 2023

Keywords

  • Amortized complexity
  • Concurrent objects
  • Counter
  • Shared memory
  • Wait-freedom

All Science Journal Classification (ASJC) codes

  • Theoretical Computer Science
  • Hardware and Architecture
  • Computer Networks and Communications
  • Computational Theory and Mathematics

Fingerprint

Dive into the research topics of 'Long-lived counters with polylogarithmic amortized step complexity'. Together they form a unique fingerprint.

Cite this