skip to main content
research-article

Polylogarithmic concurrent data structures from monotone circuits

Published:02 March 2012Publication History
Skip Abstract Section

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.

References

  1. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  2. Anderson, J. H. 1993. Composite registers. Distrib. Comput. 6, 3, 141--154. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  4. Aspnes, J. and Herlihy, M. 1990. Fast randomized consensus using shared memory. J. Algorithms 11, 3, 441--461. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Attiya, H. and Fouren, A. 2001. Adaptive and efficient algorithms for lattice agreement and renaming. SIAM J. Comput. 31, 2, 642--664. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Attiya, H., Fouren, A., and Gafni, E. 2002. An adaptive collect algorithm with applications. Distrib. Comput. 15, 2, 87--96. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Attiya, H. and Welch, J. 2004. Distributed Computing: Fundamentals, Simulations and Advanced Topics. John Wiley & Sons, Hoboken. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Bentley, J. L. and Yao, A. C.-C. 1976. An almost optimal algorithm for unbounded searching. Inf. Process. Lett. 5, 3, 82--87.Google ScholarGoogle ScholarCross RefCross Ref
  9. Elias, P. 1975. Universal codeword sets and representations of the integers. IEEE Trans. Inf. Theory 21, 2, 194--203.Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  11. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  12. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  13. Israeli, A., Shaham, A., and Shirazi, A. 1995. Linear-time snapshot implementations in unbalanced systems. Math. Syst. Theory 28, 5, 469--486.Google ScholarGoogle ScholarCross RefCross Ref
  14. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  15. Jayanti, P., Tan, K., and Toueg, S. 2000. Time and space lower bounds for nonblocking implementations. SIAM J. Comput. 30, 2, 438--456. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. 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 ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Polylogarithmic concurrent data structures from monotone circuits

                Recommendations

                Comments

                Login options

                Check if you have access through your login credentials or your institution to get full access on this article.

                Sign in

                Full Access

                • Published in

                  cover image Journal of the ACM
                  Journal of the ACM  Volume 59, Issue 1
                  February 2012
                  166 pages
                  ISSN:0004-5411
                  EISSN:1557-735X
                  DOI:10.1145/2108242
                  Issue’s Table of Contents

                  Copyright © 2012 ACM

                  Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

                  Publisher

                  Association for Computing Machinery

                  New York, NY, United States

                  Publication History

                  • Published: 2 March 2012
                  • Accepted: 1 September 2011
                  • Revised: 1 March 2011
                  • Received: 1 April 2010
                  Published in jacm Volume 59, Issue 1

                  Permissions

                  Request permissions about this article.

                  Request Permissions

                  Check for updates

                  Qualifiers

                  • research-article
                  • Research
                  • Refereed

                PDF Format

                View or Download as a PDF file.

                PDF

                eReader

                View online with eReader.

                eReader