Skip to main content

Scalable Flat-Combining Based Synchronous Queues

  • Conference paper
Distributed Computing (DISC 2010)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 6343))

Included in the following conference series:

Abstract

In a synchronous queue, producers and consumers handshake to exchange data. Recently, new scalable unfair synchronous queues were added to the Java JDK 6.0 to support high performance thread pools.

This paper applies flat-combining to the problem of designing a synchronous queue algorithm. We first use the original flat-combining algorithm, a single “combiner” thread acquires a global lock and services the other threads’ combined requests with very low synchronization overheads. As we show, this single combiner approach delivers superior performance up to a certain level of concurrency, but unfortunately does not continue to scale beyond that point.

In order to continue to deliver scalable performance as concurrency increases, we introduce a new parallel flat-combining algorithm. The new algorithm dynamically adds additional concurrently executing flat-combiners that coordinate their work. It enjoys the low coordination overheads of sequential flat combining, with the added scalability that comes with parallelism.

Our novel unfair synchronous queue using parallel flat combining exhibits scalability far and beyond that of the JDK 6.0 algorithm: it matches it in the case of a single producer and consumer, and is superior throughout the concurrency range, delivering up to 11 (eleven) times the throughput at high concurrency.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Afek, Y., Korland, G., Natanzon, M., Shavit, N.: Scalable producer-consumer pools based on elimination-diffraction trees. In: Euro-Par ’10 (June 2010) (to appear)

    Google Scholar 

  2. Attiya, H., Bar-Noy, A., Dolev, D., Peleg, D., Reischuk, R.: Renaming in an asynchronous environment. J. ACM 37(3), 524–548 (1990)

    Article  MATH  MathSciNet  Google Scholar 

  3. Hanson, D.R.: C interfaces and implementations: techniques for creating reusable software. Addison-Wesley Longman Publishing Co., Inc., Boston (1996)

    Google Scholar 

  4. Hendler, D., Incze, I., Shavit, N., Tzafrir, M.: Flat combining and the synchronization-parallelism tradeoff. In: SPAA ’10: Proceedings of the Twenty Third annual ACM Symposium on Parallelism in Algorithms and Architectures, pp. 355–364 (2010)

    Google Scholar 

  5. Herlihy, M., Shavit, N.: The Art of Multiprocessor Programming. Morgan Kaufmann, NY (2008)

    Google Scholar 

  6. Lea, D.: util.concurrent.ConcurrentHashMap in java.util.concurrent the Java Concurrency Package, http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/-src/main/java/util/concurrent/

  7. Scherer III, W.N., Lea, D., Scott, M.L.: Scalable synchronous queues. ACM Commun. 52(5), 100–111 (2009)

    Article  Google Scholar 

  8. Scherer III., W.N.: Synchronization and concurrency in user-level software systems. PhD thesis, Rochester, NY, USA, Adviser-Scott, Michael L (2006)

    Google Scholar 

  9. Scherer III, W.N., Scott, M.L.: Nonblocking concurrent data structures with condition synchronization. In: Guerraoui, R. (ed.) DISC 2004. LNCS, vol. 3274, pp. 174–187. Springer, Heidelberg (2004)

    Google Scholar 

  10. Shavit, N., Touitou, D.: Elimination trees and the construction of pools and stacks. Theory of Computing Systems 30, 645–670 (1997)

    Article  MATH  MathSciNet  Google Scholar 

  11. Shavit, N., Zemach, A.: Diffracting trees. ACM Trans. Comput. Syst. 14(4), 385–428 (1996)

    Article  Google Scholar 

  12. Treiber, R.K.: Systems programming: Coping with parallelism. Technical Report RJ 5118, IBM Almaden Research Center (April 1986)

    Google Scholar 

  13. Tzafrir, M.: C++ multi-platform memory-model solution with java orientation, http://groups.google.com/group/cpp-framework

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2010 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Hendler, D., Incze, I., Shavit, N., Tzafrir, M. (2010). Scalable Flat-Combining Based Synchronous Queues. In: Lynch, N.A., Shvartsman, A.A. (eds) Distributed Computing. DISC 2010. Lecture Notes in Computer Science, vol 6343. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-15763-9_8

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-15763-9_8

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-15762-2

  • Online ISBN: 978-3-642-15763-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics