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.
Supplemental Material
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- J. Aspnes, M. Herlihy, and N. Shavit. Counting networks. Journal of the ACM, 41:1020--1048, 1994. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- M. Herlihy and N. Shavit. The Art of Multiprocessor Programming. Morgan Kaufmann Publishers Inc., 2008. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- N. Shavit. Data structures in the multicore age. Communications ACM, 54:76--84, March 2011. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- R. Treiber. Systems programming: Coping with parallelism. Technical Report RJ5118, IBM Almaden Research Center, April 1986.Google Scholar
Index Terms
Quantitative relaxation of concurrent data structures
Recommendations
Quantitative relaxation of concurrent data structures
POPL '13: Proceedings of the 40th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languagesThere 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 ...
Concurrent Data Structures
PODC '16: Proceedings of the 2016 ACM Symposium on Principles of Distributed ComputingData structures are an important component of efficient and well-structured programs. In shared memory distributed computing, correct data structures are difficult to construct because concurrent accesses by different processes can conflict with one ...
Transactional Acceleration of Concurrent Data Structures
SPAA '15: Proceedings of the 27th ACM symposium on Parallelism in Algorithms and ArchitecturesConcurrent data structures are a fundamental building block for scalable multi-threaded programs. While Transactional Memory (TM) was originally conceived as a mechanism for simplifying the creation of concurrent data structures, modern hardware TM ...









Comments