Summary: Approximate Shared-Memory Counting Despite a
Department of Computer Science, Yale University
Department of Computer Science, Technion
A new randomized asynchronous shared-memory data structure is given for implementing an
approximate counter that can be incremented once by each of n processes in a model that al-
lows up to n - 1 crash failures. For any fixed , the counter achieves a relative error of
with high probability, at the cost of O(((1/) log n)O(1/ )) register operations per increment and
O(n4/5+ ((1/) log n)O(1/ )) register operations per read. The counter combines randomized sam-
pling for estimating large values with an expander for estimating small values. This is the first
counter implementation that is sublinear the number of processes and works despite a strong
adversary scheduler that can observe internal states of processes.
An application of the improved counter is an improved protocol for solving randomized shared-
memory consensus, which reduces the best previously known individual work complexity from
O(n log n) to an optimal O(n), resolving one of the last remaining open problems concerning
consensus in this model.
Categories and Subject Descriptors: D.1.3 [Software]: Programming Techniques--Concurrent