Abstract
This article presents constructions of useful concurrent data structures, including max registers and counters, with step complexity that is sublinear in the number of processes, n. This result avoids a well-known lower bound by having step complexity that is polylogarithmic in the number of values the object can take or the number of operations applied to it.
The key step in these implementations is a method for constructing a max register, a linearizable, wait-free concurrent data structure that supports a write operation and a read operation that returns the largest value previously written. For fixed m, an m-valued max register is constructed from one-bit multi-writer multi-reader registers at a cost of at most ⌈log m⌉ atomic register operations per write or read. An unbounded max register is constructed with cost O(min(log v, n)) to read or write a value v.
Max registers are used to transform any monotone circuit into a wait-free concurrent data structure that provides write operations setting the inputs to the circuit and a read operation that returns the value of the circuit on the largest input values previously supplied. One application is a simple, linearizable, wait-free counter with a cost of O(min(log n log v, n)) to perform an increment and O(min(log v, n)) to perform a read, where v is the current value of the counter. For polynomially-many increments, this becomes O(log2 n), an exponential improvement on the best previously known upper bounds of O(n) for exact counting and O(n 4/5+ϵ) for approximate counting.
Finally, it is shown that the upper bounds are almost optimal. It is shown that for deterministic implementations, even if they are only required to satisfy solo-termination, min(⌈log m⌉, n-1) is a lower bound on the worst-case complexity for an m-valued bounded max register, which is exactly equal to the upper bound for m ≤ 2n-1, and min(n-1, ⌈ log m⌉ - log(⌈ log m⌉ + k)) is a lower bound for the read operation of an m-valued k-additive-accurate counter, which is a bounded counter in which a read operation is allowed to return a value within an additive error of ± k of the number of increment operations linearized before it. Furthermore, even in a solo-terminating randomized implementation of an n-valued max register with an oblivious adversary and global coins, there exist simple schedules in which, with high probability, the worst-case step complexity of a read operation is Ω(log n/log log n) if the write operations have polylogarithmic step complexity.
- Afek, Y., Attiya, H., Dolev, D., Gafni, E., Merrit, M., and Shavit, N. 1993. Atomic snapshots of shared memory. J. ACM 40, 4, 873--890. Google ScholarDigital Library
- Anderson, J. H. 1993. Composite registers. Distrib. Comput. 6, 3, 141--154. Google ScholarDigital Library
- Aspnes, J. and Censor, K. 2009. Approximate shared-memory counting despite a strong adversary. In Proceedings of the 19th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA'09). SIAM, Philadelphia, PA, 441--450. Google ScholarDigital Library
- Aspnes, J. and Herlihy, M. 1990. Fast randomized consensus using shared memory. J. Algorithms 11, 3, 441--461. Google ScholarDigital Library
- Attiya, H. and Fouren, A. 2001. Adaptive and efficient algorithms for lattice agreement and renaming. SIAM J. Comput. 31, 2, 642--664. Google ScholarDigital Library
- Attiya, H., Fouren, A., and Gafni, E. 2002. An adaptive collect algorithm with applications. Distrib. Comput. 15, 2, 87--96. Google ScholarDigital Library
- Attiya, H. and Welch, J. 2004. Distributed Computing: Fundamentals, Simulations and Advanced Topics. John Wiley & Sons, Hoboken. Google ScholarDigital Library
- Bentley, J. L. and Yao, A. C.-C. 1976. An almost optimal algorithm for unbounded searching. Inf. Process. Lett. 5, 3, 82--87.Google ScholarCross Ref
- Elias, P. 1975. Universal codeword sets and representations of the integers. IEEE Trans. Inf. Theory 21, 2, 194--203.Google ScholarDigital Library
- Fich, F. E., Hendler, D., and Shavit, N. 2005. Linear lower bounds on real-world implementations of concurrent objects. In Proceedings of the 46th Annual IEEE Symposium on Foundations of Computer Science (FOCS'05). IEEE Computer Society, Los Alamitos, CA, 165--173. Google ScholarDigital Library
- Herlihy, M. P. and Wing, J. M. 1990. Linearizability: a correctness condition for concurrent objects. ACM Trans. Prog. Lang. Syst. 12, 3, 463--492. Google ScholarDigital Library
- Inoue, M. and Chen, W. 1994. Linear-time snapshot using multi-writer multi-reader registers. In Proceedings of the 8th International Workshop on Distributed Algorithms (WDAG'94). Lecture Notes in Computer Science, vol. 857, Springer, New York, 130--140. Google ScholarDigital Library
- Israeli, A., Shaham, A., and Shirazi, A. 1995. Linear-time snapshot implementations in unbalanced systems. Math. Syst. Theory 28, 5, 469--486.Google ScholarCross Ref
- Jayanti, P. 2002. f-arrays: Implementation and applications. In Proceedings of the 21st Annual Symposium on Principles of Distributed Computing (PODC'02). ACM, New York, 270--279. Google ScholarDigital Library
- Jayanti, P., Tan, K., and Toueg, S. 2000. Time and space lower bounds for nonblocking implementations. SIAM J. Comput. 30, 2, 438--456. Google ScholarDigital Library
- Yao, A. C.-C. 1977. Probabilistic computations: Toward a unified measure of complexity. In Proceedings of the 17th Annual Symposium on Foundations of Computer Science. IEEE Computer Society, Los Alamitos, CA, 222--227. Google ScholarDigital Library
Index Terms
- Polylogarithmic concurrent data structures from monotone circuits
Recommendations
Max registers, counters, and monotone circuits
PODC '09: Proceedings of the 28th ACM symposium on Principles of distributed computingA method is given for constructing a max register, a linearizable, wait-free concurrent data structure that supports a write operation and a read operation that returns the largest value previously written. For fixed m, an m-valued max register can be ...
Tight Bounds for Adopt-Commit Objects
We give matching upper and lower bounds of $\varTheta(\min(\frac{\log m}{\log \log m},\, n))$ for the individual step complexity of a wait-free m -valued adopt-commit object implemented using multi-writer registers for n anonymous processes. While the upper bound is deterministic, the lower bound ...
Monotone Circuits for Connectivity Have Depth (log n)2-o(1)
We prove that a monotone circuit of size nd recognizing connectivity must have depth $\Omega((\log n)^2/\log d)$. For formulas this implies depth $\Omega((\log n)^2/\log\log n)$. For polynomial-size circuits the bound becomes $\Omega((\log n)^2)$ which ...
Comments