skip to main content
research-article

Quantitative relaxation of concurrent data structures

Published:23 January 2013Publication History
Skip Abstract Section

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.

Skip Supplemental Material Section

Supplemental Material

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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. J. Aspnes, M. Herlihy, and N. Shavit. Counting networks. Journal of the ACM, 41:1020--1048, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. M. Herlihy and N. Shavit. The Art of Multiprocessor Programming. Morgan Kaufmann Publishers Inc., 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle ScholarCross RefCross Ref
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. N. Shavit. Data structures in the multicore age. Communications ACM, 54:76--84, March 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. R. Treiber. Systems programming: Coping with parallelism. Technical Report RJ5118, IBM Almaden Research Center, April 1986.Google ScholarGoogle Scholar

Index Terms

  1. Quantitative relaxation of concurrent data structures

            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

            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 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

              Copyright © 2013 ACM

              Publisher

              Association for Computing Machinery

              New York, NY, United States

              Publication History

              • Published: 23 January 2013

              Check for updates

              Qualifiers

              • research-article

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader
            About Cookies On This Site

            We use cookies to ensure that we give you the best experience on our website.

            Learn more

            Got it!