Abstract
Over the past two decades, many concurrent data structures have been designed and implemented. Nearly all such work analyzes concurrent data structures empirically, omitting asymptotic bounds on their efficiency, partly because of the complexity of the analysis needed, and partly because of the difficulty of obtaining relevant asymptotic bounds: when the analysis takes into account important practical factors, such as contention, it is difficult or even impossible to prove desirable bounds.
In this paper, we show that considering structured concurrency or relaxed concurrency models can enable establishing strong bounds, also for contention. To this end, we first present a dynamic relaxed counter data structure that indicates the non-zero status of the counter. Our data structure extends a recently proposed data structure, called SNZI, allowing our structure to grow dynamically in response to the increasing degree of concurrency in the system.
Using the dynamic SNZI data structure, we then present a concurrent data structure for series-parallel directed acyclic graphs (sp-dags), a key data structure widely used in the implementation of modern parallel programming languages. The key component of sp-dags is an in-counter data structure that is an instance of our dynamic SNZI. We analyze the efficiency of our concurrent sp-dags and in-counter data structures under nested-parallel computing paradigm. This paradigm offers a structured model for concurrency. Under this model, we prove that our data structures require amortized (1) shared memory steps, including contention. We present an implementation and an experimental evaluation that suggests that the sp-dags data structure is practical and can perform well in practice.
- Umut A. Acar, Naama Ben-David, and Mike Rainey. Contention in structured concurrency: Provably efficient dynamic nonzero indicators for nested parallel computation. Technical Report Carnegie Mellon University-CS-16-133, Department of Computer Science, Carnegie Mellon University, 2016.Google Scholar
- Umut A. Acar, Arthur Charguéraud, and Mike Rainey. Scheduling parallel programs by work stealing with private deques. In PPoPP '13, 2013. Google Scholar
Digital Library
- Umut A. Acar, Arthur Charguéraud, Mike Rainey, and Filip Sieczkowski. Dag-calculus: A calculus for parallel computation. In Proceedings of the 21st ACM SIGPLAN International Conference on Functional Programming, ICFP 2016, pages 18--32, 2016. Google Scholar
Digital Library
- A. Agarwal and M. Cherian. Adaptive backoff synchronization techniques. In Proceedings of the 16th Annual International Symposium on Computer Architecture, ISCA '89, pages 396--406, 1989. Google Scholar
Digital Library
- James H. Anderson and Yong-Jik Kim. An improved lower bound for the time complexity of mutual exclusion. Distrib. Comput., 15(4):221--253, December 2002. Google Scholar
Digital Library
- T. E. Anderson. The performance of spin lock alternatives for shared-memory multiprocessors. IEEE Trans. Parallel Distrib. Syst., 1(1):6--16, January 1990. Google Scholar
Digital Library
- Nimar S. Arora, Robert D. Blumofe, and C. Greg Plaxton. Thread scheduling for multiprogrammed multiprocessors. In Proceedings of the tenth annual ACM symposium on Parallel algorithms and architectures, SPAA '98, pages 119--129. ACM Press, 1998. Google Scholar
Digital Library
- Robert D. Blumofe and Charles E. Leiserson. Scheduling multithreaded computations by work stealing. J. ACM, 46:720--748, September 1999. Google Scholar
Digital Library
- Trevor Brown, Faith Ellen, and Eric Ruppert. A general technique for non-blocking trees. In Proceedings of the 19th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP '14, pages 329--342, 2014. Google Scholar
Digital Library
- Philippe Charles, Christian Grothoff, Vijay Saraswat, Christopher Donawa, Allan Kielstra, Kemal Ebcioglu, Christoph von Praun, and Vivek Sarkar. X10: an object-oriented approach to non-uniform cluster computing. In Proceedings of the 20th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, OOPSLA '05, pages 519--538. ACM, 2005. Google Scholar
Digital Library
- Robert Cypher. The communication requirements of mutual exclusion. In Proceedings of the Seventh Annual ACM Symposium on Parallel Algorithms and Architectures, SPAA '95, pages 147--156, 1995. Google Scholar
Digital Library
- Cynthia Dwork, Maurice Herlihy, and Orli Waarts. Contention in shared memory algorithms. Journal of the ACM (JACM), 44(6):779--805, 1997. Google Scholar
Digital Library
- Faith Ellen, Panagiota Fatourou, Joanna Helga, and Eric Ruppert. The amortized complexity of non-blocking binary search trees. In Proceedings of the 2014 ACM Symposium on Principles of Distributed Computing, PODC '14, pages 332--340, 2014. Google Scholar
Digital Library
- Faith Ellen, Yossi Lev, Victor Luchangco, and Mark Moir. Snzi: Scalable nonzero indicators. In Proceedings of the Twenty-sixth Annual ACM Symposium on Principles of Distributed Computing, PODC '07, pages 13--22, 2007. Google Scholar
Digital Library
- Faith Fich and Eric Ruppert. Hundreds of impossibility results for distributed computing. Distrib. Comput., 16(2-3):121--163, September 2003. Google Scholar
Digital Library
- Faith Ellen Fich, Danny Hendler, and Nir Shavit. Linear lower bounds on real-world implementations of concurrent objects. In Foundations of Computer Science, 2005. FOCS 2005. 46th Annual IEEE Symposium on, pages 165--173. IEEE, 2005. Google Scholar
Digital Library
- Matthew Fluet, Mike Rainey, John Reppy, and Adam Shaw. Implicitly threaded parallelism in Manticore. Journal of Functional Programming, 20(5-6):1--40, 2011.Google Scholar
- Mikhail Fomitchev and Eric Ruppert. Lock-free linked lists and skip lists. In Proceedings of the Twenty-third Annual ACM Symposium on Principles of Distributed Computing, PODC '04, pages 50--59, 2004. Google Scholar
Digital Library
- Matteo Frigo, Charles E. Leiserson, and Keith H. Randall. The implementation of the Cilk-5 multithreaded language. In PLDI, pages 212--223, 1998. Google Scholar
Digital Library
- Phillip B Gibbons, Yossi Matias, and Vijaya Ramachandran. Efficient low-contention parallel algorithms. In Proceedings of the sixth annual ACM symposium on Parallel algorithms and architectures, pages 236--247. ACM, 1994.Google Scholar
Digital Library
- Phillip B Gibbons, Yossi Matias, Vijaya Ramachandran, et al. The queue-read queue-write pram model: Accounting for contention in parallel algorithms. SIAM Journal on Computing, pages 638--648, 1997.Google Scholar
- James R. Goodman, Mary K. Vernon, and Philip J. Woest. Efficient synchronization primitives for large-scale cache-coherent multiprocessors. In Proceedings of the Third International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS III, pages 64--75, 1989. Google Scholar
Digital Library
- Tim Harris and Keir Fraser. Language support for lightweight transactions. In Proceedings of the 18th Annual ACM SIGPLAN Conference on Object-oriented Programing, Systems, Languages, and Applications, OOPSLA '03, pages 388--402, 2003. Google Scholar
Digital Library
- Maurice Herlihy. Wait-free synchronization. ACM Trans. Program. Lang. Syst., 13:124--149, January 1991. Google Scholar
Digital Library
- Maurice Herlihy. A methodology for implementing highly concurrent data objects. ACM Trans. Program. Lang. Syst., 15(5):745--770, November 1993. Google Scholar
Digital Library
- Maurice Herlihy, Victor Luchangco, Mark Moir, and William N Scherer III. Software transactional memory for dynamic-sized data structures. In Proceedings of the twenty-second annual symposium on Principles of distributed computing, pages 92--101. ACM, 2003.Google Scholar
Digital Library
- Maurice Herlihy, Nir Shavit, and Orli Waarts. Linearizable counting networks. Distributed Computing, 9(4):193--203, 1996. Google Scholar
Digital Library
- Shams Mahmood Imam and Vivek Sarkay. Habanero-java library: a java 8 framework for multicore programming. In 2014 International Conference on Principles and Practices of Programming on the Java Platform Virtual Machines, Languages and Tools, PPPJ '14, Cracow, Poland, September 23--26, 2014, pages 75--86, 2014. Google Scholar
Digital Library
- Intel. Intel threading building blocks. 2011. https://www.threadingbuildingblocks.org/.Google Scholar
- Prasad Jayanti, King Tan, and Sam Toueg. Time and space lower bounds for nonblocking implementations. SIAM Journal on Computing, 30(2):438--456, 2000. Google Scholar
Digital Library
- Richard M Karp and Yanjun Zhang. Randomized parallel algorithms for backtrack search and branch-and-bound computation. Journal of the ACM (JACM), 40(3):765--789, 1993. Google Scholar
Digital Library
- Gabriele Keller, Manuel M.T. Chakravarty, Roman Leshchinskiy, Simon Peyton Jones, and Ben Lippmeier. Regular, shape-polymorphic, parallel arrays in haskell. In Proceedings of the 15th ACM SIGPLAN international conference on Functional programming, ICFP '10, pages 261--272, 2010.Google Scholar
Digital Library
- Alex Kogan and Erez Petrank. A methodology for creating fast wait-free data structures. In Proceedings of the 17th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP '12, pages 141--150, 2012. Google Scholar
Digital Library
- Doug Lea. A java fork/join framework. In Proceedings of the ACM 2000 conference on Java Grande, JAVA '00, pages 36--43, 2000. Google Scholar
Digital Library
- Daan Leijen, Wolfram Schulte, and Sebastian Burckhardt. The design of a task parallel library. In Proceedings of the 24th ACM SIGPLAN conference on Object oriented programming systems languages and applications, OOPSLA '09, pages 227--242, 2009. Google Scholar
Digital Library
- Pangfeng Liu, William Aiello, and Sandeep Bhatt. An atomic model for message-passing. In Proceedings of the fifth annual ACM symposium on Parallel algorithms and architectures, pages 154--163. ACM, 1993. Google Scholar
Digital Library
- Maged M. Michael and Michael L. Scott. Nonblocking algorithms and preemption-safe locking on multiprogrammed shared memory multiprocessors. J. Parallel Distrib. Comput., 51(1):1--26, May 1998. Google Scholar
Digital Library
- Mark Moir and Nir Shavit. Concurrent data structures. Handbook of Data Structures and Applications, pages 47--14, 2007.Google Scholar
- Rotem Oshman and Nir Shavit. The skiptrie: Low-depth concurrent search without rebalancing. In Proceedings of the 2013 ACM Symposium on Principles of Distributed Computing, PODC '13, pages 23--32, 2013. Google Scholar
Digital Library
- William N. Scherer, III and Michael L. Scott. Advanced contention management for dynamic software transactional memory. In Proceedings of the Twenty-fourth Annual ACM Symposium on Principles of Distributed Computing, PODC '05, pages 240--248, 2005. Google Scholar
Digital Library
- Nir Shavit and Dan Touitou. Software transactional memory. In Proceedings of the Fourteenth Annual ACM Symposium on Principles of Distributed Computing, PODC '95, pages 204--213, 1995. Google Scholar
Digital Library
- Nir Shavit and Asaph Zemach. Combining funnels. J. Parallel Distrib. Comput., 60(11):1355--1387, November 2000. Google Scholar
Digital Library
- Julian Shun, Guy E. Blelloch, Jeremy T. Fineman, and Phillip B. Gibbons. Reducing contention through priority updates. In Proceedings of the Twenty-fifth Annual ACM Symposium on Parallelism in Algorithms and Architectures, SPAA '13, pages 152--163, 2013.Google Scholar
Digital Library
- Shahar Timnat and Erez Petrank. A practical wait-free simulation for lock-free data structures. In Proceedings of the 19th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP '14, pages 357--368, 2014. Google Scholar
Digital Library
- R Kent Treiber. Systems programming: Coping with parallelism. Technical report, International Business Machines Incorporated, Thomas J. Watson Research Center, 1986.Google Scholar
Index Terms
Contention in Structured Concurrency: Provably Efficient Dynamic Non-Zero Indicators for Nested Parallelism
Recommendations
Contention in Structured Concurrency: Provably Efficient Dynamic Non-Zero Indicators for Nested Parallelism
PPoPP '17: Proceedings of the 22nd ACM SIGPLAN Symposium on Principles and Practice of Parallel ProgrammingOver the past two decades, many concurrent data structures have been designed and implemented. Nearly all such work analyzes concurrent data structures empirically, omitting asymptotic bounds on their efficiency, partly because of the complexity of the ...
Brief Announcement: Proust: A Design Space for Highly-Concurrent Transactional Data Structures
PODC '17: Proceedings of the ACM Symposium on Principles of Distributed ComputingMost STM systems are poorly equipped to support libraries of concurrent data structures. One reason is that they typically detect conflicts by tracking transactions' read sets and write sets, an approach that often leads to false conflicts. A second is ...
Structured Concurrency: A Review
ICPP Workshops '22: Workshop Proceedings of the 51st International Conference on Parallel ProcessingToday, mobile applications use thousands of concurrent tasks to process multiple sensor inputs to ensure a better user experience. With this demand, the ability to manage these concurrent tasks efficiently and easily is becoming a new challenge, ...







Comments