Abstract
This paper presents lower bounds on the time- and space-complexity of implementations that use the k compare-and-swap (k-CAS) synchronization primitives. We prove that the use of k-CAS primitives cannot improve neither the time- nor the space-complexity of implementations of widely-used concurrent objects, such as counter, stack, queue, and collect. Surprisingly, the use of k-CAS may even increase the space complexity required by such implementations.
We prove that the worst-case average number of steps performed by processes for any n-process implementation of a counter, stack or queue object is Ω(log k + 1 n), even if the implementation can use j-CAS for j ≤ k. This bound holds even if a k-CAS operation is allowed to read the k values of the objects it accesses and return these values to the calling process. This bound is tight.
We also consider more realistic non-readingk-CAS primitives. An operation of a non-reading k-CAS primitive is only allowed to return a success/failure indication. For implementations of the collect object that use such primitives, we prove that the worst-case average number of steps performed by processes is Ω(log2 n), regardless of the value of k. This implies a round complexity lower bound of Ω(log2 n) for such implementations. As there is an O(log2 n) round complexity implementation of collect that uses only reads and writes, these results establish that non-reading k-CAS is no stronger than read and write for collect implementation round complexity.
We also prove that k-CAS does not improve the space complexity of implementing many objects (including counter, stack, queue, and single-writer snapshot). An implementation has to use at least n base objects even if k-CAS is allowed, and if all operations (other than read) swap exactly k base objects, then the space complexity must be at least k · n.
Access provided by Autonomous University of Puebla. Download to read the full chapter text
Chapter PDF
Similar content being viewed by others
References
Afek, Y., Dauber, D., Touitou, D.: Wait-free made fast. In: STOC, pp. 538–547 (1995)
Afek, Y., Merritt, M., Taubenfeld, G.: The power of multi-objects. Information and Computation 153(1), 117–138 (1999)
Afek, Y., Merritt, M., Taubenfeld, G., Touitou, D.: Disentangling multi-object operations. In: PODC, pp. 111–120 (1997)
Afek, Y., Stupp, G., Touitou, D.: Long-lived adaptive collect with applications. In: FOCS, p. 262 (1999)
Agesen, O., Detlefs, D., Flood, C.H., Garthwaite, A.T., Martin, P.A., Moir, M., Shavit, N.: Dcas-based concurrent deques. Theory Comput. Syst. 35(3), 349–386 (2002)
Anderson, J.H., Moir, M.: Universal constructions for multi-object operations. In: PODC 1995: Proceedings of the fourteenth annual ACM symposium on Principles of distributed computing, pp. 184–193. ACM Press, New York (1995)
Attiya, H., Dagan, E.: Improved implementations of binary universal operations. Journal of the ACM 48(5), 1013–1037 (2001)
Attiya, H., Lynch, N., Shavit, N.: Are wait-free algorithms fast? Journal of the ACM 41(4), 725–763 (1994)
Barnes, G.: A method for implementing lock-free shared data structures. In: SPAA, pp. 261–270 (1993)
Beame, P.: Limits on the power of concurrent-write parallel machines. Information and Computation 76(1), 13–28 (1988)
Cole, R., Zajicek, O.: The apram: incorporating asynchrony into the pram model. In: SPAA, pp. 169–178 (1989)
Doherty, S., Detlefs, D., Groves, L., Flood, C.H., Luchangco, V., Martin, P.A., Moir, M., Shavit, N.: DCAS is not a silver bullet for nonblocking algorithm design. In: SPAA, pp. 216–224 (2004)
Fich, F., Herlihy, M., Shavit, N.: On the space complexity of randomized synchronization. Journal of the ACM 45(5), 843–862 (1998)
Fich, F.E., Hendler, D., Shavit, N.: On the inherent weakness of conditional synchronization primitives. In: PODC, pp. 80–87 (2004)
Fischer, M.J., Moran, S., Rudich, S., Taubenfeld, G.: The wakeup problem. SIAM Journal on Computing 25(6), 1332–1357 (1996)
Fraser, K.: Practical Lock-Freedom. PhD thesis, Kings College University of Cambridge (September 2003)
Greenwald, M.: Non-Blocking Synchronization and System Design. PhD thesis, Stanford University Technical Report STAN-CS-TR-99-1624, Palo Alto, CA (August 1999)
Greenwald, M.B., Cheriton, D.R.: The synergy between non-blocking synchronization and operating system structure. In: OSDI, pp. 123–136 (1996)
Ha, P.H., Tsigas, P.: Reactive multi-word synchronization. In: 12th International Conference on Parallel Architectures and Compilation Techniques, pp. 184–193 (2003)
Herlihy, M.: Wait-free synchronization. ACM Transactions On Programming Languages and Systems 13(1), 123–149 (1991)
Herlihy, M., Luchango, V., Moir, M.: Obstruction-free synchronization: Doubleended queues as an example. In: ICDCS, pp. 522–529 (2003)
Intel Corporation. Intel itanium processor-specific application binary interface (2001)
Jayanti, P.: A time complexity lower bound for randomized implementations of some shared objects. In: PODC, pp. 201–210 (1998)
Jayanti, P., Khanna, S.: On the power of multi-objects. In: Mavronicolas, M. (ed.) WDAG 1997. LNCS, vol. 1320, pp. 320–332. Springer, Heidelberg (1997)
Jayanti, P., Tan, K., Toueg, S.: Time and space lower bounds for non-blocking implementations. Siam J. Comput. 30(2), 438–456 (2000)
Luchangco, V., Moir, M., Shavit, N.: Nonblocking k-compare-single-swap. In: SPAA, pp. 314–323 (2003)
Motorola. MC68020 32-Bit Microprocessor User’s Manual, 2nd edn. Prentice-Hall, Englewood Cliffs (1986)
Shavit, N., Touitou, D.: Software transactional memory. Distributed Computing 10(2), 99–116 (1997)
SPARC International, Inc., Mountain View, CA. The SPARC Architecture Manual Version 9, 1/e. Prentice Hall (1994)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2005 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Attiya, H., Hendler, D. (2005). Time and Space Lower Bounds for Implementations Using k-CAS. In: Fraigniaud, P. (eds) Distributed Computing. DISC 2005. Lecture Notes in Computer Science, vol 3724. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11561927_14
Download citation
DOI: https://doi.org/10.1007/11561927_14
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-29163-3
Online ISBN: 978-3-540-32075-3
eBook Packages: Computer ScienceComputer Science (R0)