skip to main content
research-article

Quantitative relaxation of concurrent data structures

Published: 23 January 2013 Publication History

Abstract

There is a trade-off between performance and correctness in implementing concurrent data structures. Better performance may be achieved at the expense of relaxing correctness, by redefining the semantics of data structures. We address such a redefinition of data structure semantics and present a systematic and formal framework for obtaining new data structures by quantitatively relaxing existing ones. We view a data structure as a sequential specification S containing all "legal" sequences over an alphabet of method calls. Relaxing the data structure corresponds to defining a distance from any sequence over the alphabet to the sequential specification: the k-relaxed sequential specification contains all sequences over the alphabet within distance k from the original specification. In contrast to other existing work, our relaxations are semantic (distance in terms of data structure states). As an instantiation of our framework, we present two simple yet generic relaxation schemes, called out-of-order and stuttering relaxation, along with several ways of computing distances. We show that the out-of-order relaxation, when further instantiated to stacks, queues, and priority queues, amounts to tolerating bounded out-of-order behavior, which cannot be captured by a purely syntactic relaxation (distance in terms of sequence manipulation, e.g. edit distance). We give concurrent implementations of relaxed data structures and demonstrate that bounded relaxations provide the means for trading correctness for performance in a controlled way. The relaxations are monotonic which further highlights the trade-off: increasing k increases the number of permitted sequences, which as we demonstrate can lead to better performance. Finally, since a relaxed stack or queue also implements a pool, we actually have new concurrent pool implementations that outperform the state-of-the-art ones.

Supplementary Material

JPG File (r1d2_talk7.jpg)
MP4 File (r1d2_talk7.mp4)

References

[1]
Y. Afek, G. Korland, M. Natanzon, and N. Shavit. Scalable producerconsumer pools based on elimination-diffraction trees. In Proc. European Conference on Parallel Processing (Euro-Par), pages 151--162. Springer, 2010.
[2]
Y. Afek, G. Korland, and E. Yanovsky. Quasi linearizability: Relaxed consistency for improved concurrency. In Proc. Conference on Principles of Distributed Systems (OPODIS), pages 395--410. Springer, 2010.
[3]
Y. Afek, M. Hakimi, and A. Morrison. Fast and scalable rendezvousing. In Proc. International Conference on Distributed Computing (DISC), pages 16--31, Berlin, Heidelberg, 2011. Springer-Verlag.
[4]
J. Aspnes, M. Herlihy, and N. Shavit. Counting networks. Journal of the ACM, 41:1020--1048, 1994.
[5]
H. Attiya, R. Guerraoui, D. Hendler, P. Kuznetsov, M. Michael, and M. Vechev. Laws of order: expensive synchronization in concurrent algorithms cannot be eliminated. In Proc. of Principles of Programming Languages (POPL), pages 487--498. ACM, 2011.
[6]
M. Herlihy and N. Shavit. The Art of Multiprocessor Programming. Morgan Kaufmann Publishers Inc., 2008.
[7]
M. Herlihy and J. Wing. Linearizability: a correctness condition for concurrent objects. ACM Transactions on Programming Languages and Systems (TOPLAS), 12(3):463--492, 1990.
[8]
D. H. I. Incze, N. Shavit, and M. Tzafrir. Flat combining and the synchronization-parallelism tradeoff. In Proc. Symposium on Parallelism in Algorithms and Architectures (SPAA), pages 355--364. ACM, 2010.
[9]
C. Kirsch and H. Payer. Incorrect systems: It's not the problem, it's the solution. In Proc. Design Automation Conference (DAC). ACM, 2012.
[10]
C. Kirsch, H. Payer, H. Röck, and A. Sokolova. Brief announcement: Scalability versus semantics of concurrent FIFO queues. In Proc. Symposium on Principles of Distributed Computing (PODC). ACM, 2011.
[11]
C. Kirsch, M. Lippautz, and H. Payer. Fast and scalable k-fifo queues. Technical Report 2012-04, Department of Computer Sciences, University of Salzburg, June 2012.
[12]
C. Kirsch, H. Payer, H. Rock, and A. Sokolova. Performance, scalability, and semantics of concurrent FIFO queues. In Proc. International Conference on Algorithms and Architectures for Parallel Processing (ICA3PP), pages 273--287. LNCS 7439, 2012.
[13]
V. Luchangco, M. M., and N. Shavit. On the uncontended complexity of consensus. In Proc. International Symposium on Distributed Computing (DISC), pages 45--59. Springer-Verlag, 2003.
[14]
M. Michael and M. Scott. Simple, fast, and practical non-blocking and blocking concurrent queue algorithms. In Proc. Symposium on Principles of Distributed Computing (PODC), pages 267--275. ACM, 1996.
[15]
M. Michael, M. Vechev, and V. Saraswat. Idempotent work stealing. In Proc. Principles and Practice of Parallel Programming (PPoPP), pages 45--54. ACM, 2009.
[16]
S. Misailovic, S. Sidiroglou, H. Hoffmann, and M. C. Rinard. Quality of service profiling. In Proc. 32nd ACM/IEEE International Conference on Software Engineering (ICSE) - Volume 1, pages 25--34. ACM, 2010.
[17]
A. Sampson, W. Dietl, E. Fortuna, D. Gnanapragasam, L. Ceze, and D. Grossman. Enerj: approximate data types for safe and general lowpower computation. In Proc. 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 164--174. ACM, 2011.
[18]
N. Shavit. Data structures in the multicore age. Communications ACM, 54:76--84, March 2011.
[19]
H. Sundell, A. Gidenstam, M. Papatriantafilou, and P. Tsigas. A lockfree algorithm for concurrent bags. In Proc. Symposium on Parallelism in Algorithms and Architectures (SPAA), pages 335--344, New York, NY, USA, 2011. ACM.
[20]
R. Treiber. Systems programming: Coping with parallelism. Technical Report RJ5118, IBM Almaden Research Center, April 1986.

Cited By

View all

Recommendations

Reviews

Weijia Che

Evolving trends in hardware, especially the shift from single-core to multicore and many-core processors, have pushed current programming to the center of the discussion in many designs and implementations. Many reports published in recent years address the parallelization of single-threaded programs for multicore and many-core architectures. This paper tackles the problem from an entirely different angle. To reduce contention and thus improve scalable performance in multithreaded programming, the authors propose quantitative relaxation of concurrent data structures. They present examples of k -stack and k -stuttering counters that illustrate the implementation of relaxed data structures, accompanied by illuminating discussions. The significance of this paper is that it provides a framework for quantitative relaxation of concurrent data structures, and thus opens a new path for exploring concurrency in single-threaded designs. Online Computing Reviews Service

Access critical reviews of Computing literature here

Become a reviewer for Computing Reviews.

Comments

Information & Contributors

Information

Published In

cover image ACM SIGPLAN Notices
ACM SIGPLAN Notices  Volume 48, Issue 1
POPL '13
January 2013
561 pages
ISSN:0362-1340
EISSN:1558-1160
DOI:10.1145/2480359
Issue’s Table of Contents
  • cover image ACM Conferences
    POPL '13: Proceedings of the 40th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
    January 2013
    586 pages
    ISBN:9781450318327
    DOI:10.1145/2429069
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: 23 January 2013
Published in SIGPLAN Volume 48, Issue 1

Check for updates

Author Tags

  1. (concurrent) data structures
  2. costs
  3. quantitative models
  4. relaxed semantics

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)77
  • Downloads (Last 6 weeks)9
Reflects downloads up to 27 Dec 2024

Other Metrics

Citations

Cited By

View all

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media