skip to main content
research-article
Open Access

A Scalable, Correct Time-Stamped Stack

Published:14 January 2015Publication History
Skip Abstract Section

Abstract

Concurrent data-structures, such as stacks, queues, and deques, often implicitly enforce a total order over elements in their underlying memory layout. However, much of this order is unnecessary: linearizability only requires that elements are ordered if the insert methods ran in sequence. We propose a new approach which uses timestamping to avoid unnecessary ordering. Pairs of elements can be left unordered if their associated insert operations ran concurrently, and order imposed as necessary at the eventual removal.

We realise our approach in a new non-blocking data-structure, the TS (timestamped) stack. Using the same approach, we can define corresponding queue and deque data-structures. In experiments on x86, the TS stack outperforms and outscales all its competitors -- for example, it outperforms the elimination-backoff stack by factor of two. In our approach, more concurrency translates into less ordering, giving less-contended removal and thus higher performance and scalability. Despite this, the TS stack is linearizable with respect to stack semantics.

The weak internal ordering in the TS stack presents a challenge when establishing linearizability: standard techniques such as linearization points work well when there exists a total internal order. We present a new stack theorem, mechanised in Isabelle, which characterises the orderings sufficient to establish stack semantics. By applying our stack theorem, we show that the TS stack is indeed linearizable. Our theorem constitutes a new, generic proof technique for concurrent stacks, and it paves the way for future weakly ordered data-structure designs.

Skip Supplemental Material Section

Supplemental Material

p233-sidebyside.mpg

mpg

1.7 GB

References

  1. Y. Afek and A. Morrison. Fast concurrent queues for x86 processors. In phPPoPP. ACM, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. 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 phPOPL, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. G. Bar-Nissan, D. Hendler, and A. Suissa. A dynamic elimination-combining stack algorithm. In phOPODIS, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. M. Batty, M. Dodds, and A. Gotsman. Library abstraction for C/CGoogle ScholarGoogle Scholar
  5. concurrency. In phPOPL, 2013.Google ScholarGoogle Scholar
  6. }scalComputational Systems Group, University of Salzburg. Scal framework. URL http://scal.cs.uni-salzburg.at.Google ScholarGoogle Scholar
  7. M. Gorelik and D. Hendler. Brief announcement: an asymmetric flat-combining based queue algorithm. In phPODC, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. A. Haas, C. Kirsch, M. Lippautz, and H. Payer. How FIFO is your concurrent FIFO queue? In phRACES. ACM, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. A. Haas, T. Henzinger, C. Kirsch, M. Lippautz, H. Payer, A. Sezgin, and A. Sokolova. Distributed queues in shared memory--multicore performance and scalability through quantitative relaxation. In phCF. ACM, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. D. Hendler, N. Shavit, and L. Yerushalmi. A scalable lock-free stack algorithm. In phSPAA. ACM, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. D. Hendler, I. Incze, N. Shavit, and M. Tzafrir. Flat combining and the synchronization-parallelism tradeoff. In phSPAA, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Henzinger, Payer, and Sezgin}Henzinger13bT. Henzinger, H. Payer, and A. Sezgin. Replacing competition with cooperation to achieve scalable lock-free FIFO queues. Technical Report IST-2013--124-v1Google ScholarGoogle Scholar
  13. 1, IST Austria, 2013\natexlaba.Google ScholarGoogle Scholar
  14. Henzinger, Sezgin, and Vafeiadis}Henzinger13T. A. Henzinger, A. Sezgin, and V. Vafeiadis. Aspect-oriented linearizability proofs. In phCONCUR, 2013\natexlabb. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. M. Herlihy and N. Shavit. phThe Art of Multiprocessor Programming. Morgan Kaufmann Publishers Inc., 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. M. Herlihy and J. Wing. Linearizability: a correctness condition for concurrent objects. phTOPLAS, 12 (3), 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. M. Hoffman, O. Shalev, and N. Shavit. The baskets queue. In phOPODIS. Springer, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Intel. Intel 64 and ia-32 architectures software developer's manual, volume 3b: System programming guide, part 2, 2013. URL http://download.intel.com/products/processor/manual/253669.pdf.Google ScholarGoogle Scholar
  19. L. Lamport. Time, clocks, and the ordering of events in a distributed system. phCommunications ACM, 21, July 1978. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. M. Michael and M. Scott. Simple, fast, and practical non-blocking and blocking concurrent queue algorithms. In phPODC. ACM, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. H. H. Nguyen and M. Rinard. Detecting and eliminating memory leaks using cyclic memory allocation. In phISMM. ACM, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. W. Ruan, Y. Liu, and M. Spear. Boosting timestamp-based transactional memory by exploiting hardware cycle counters. In phTRANSACT, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. P. Sewell, S. Sarkar, S. Owens, F. Z. Nardelli, and M. O. Myreen. x86-TSO: a rigorous and usable programmer's model for x86 multiprocessors. phCommun. ACM, 53 (7), 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. R. Treiber. Systems programming: Coping with parallelism. Technical Report RJ5118, IBM Almaden Research Center, April 1986.Google ScholarGoogle Scholar

Index Terms

  1. A Scalable, Correct Time-Stamped Stack

            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 ACM SIGPLAN Notices
              ACM SIGPLAN Notices  Volume 50, Issue 1
              POPL '15
              January 2015
              682 pages
              ISSN:0362-1340
              EISSN:1558-1160
              DOI:10.1145/2775051
              • Editor:
              • Andy Gill
              Issue’s Table of Contents
              • cover image ACM Conferences
                POPL '15: Proceedings of the 42nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages
                January 2015
                716 pages
                ISBN:9781450333009
                DOI:10.1145/2676726

              Copyright © 2015 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: 14 January 2015

              Check for updates

              Qualifiers

              • research-article

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader