Advertisement

CAFÉ: Scalable Task Pools with Adjustable Fairness and Contention

  • Dmitry Basin
  • Rui Fan
  • Idit Keidar
  • Ofer Kiselov
  • Dmitri Perelman
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6950)

Abstract

Task pools have many important applications in distributed and parallel computing. Pools are typically implemented using concurrent queues, which limits their scalability. We introduce CAFÉ, Contention and Fairness Explorer, a scalable and wait-free task pool which allows users to control the trade-off between fairness and contention. The main idea behind CAFÉ is to maintain a list of TreeContainers, a novel tree-based data structure providing efficient task inserts and retrievals. TreeContainers don’t guarantee FIFO ordering on task retrievals. But by varying the size of the trees, CAFÉ can provide any type of pool, from ones using large trees with low contention but less fairness, to ones using small trees with higher contention but also greater fairness.

We demonstrate the scalability of TreeContainer by proving an O(log2 N) bound on the step complexity of insert operations when there are N inserts, as compared to an average of Ω(N) steps in a queue based implementation. We further prove that get operations are wait-free. Evaluations of CAFÉ show that it outperforms the Java SDK implementation of the Michael-Scott queue by a factor of 30, and is over three times faster than other state-of-the-art non-FIFO task pools.

Keywords

Tree Height Step Complexity FIFO Queue Complete Binary Tree Hardware Thread 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Afek, Y., Korland, G., Natanzon, M., Shavit, N.: Scalable producer-consumer pools based on elimination-diffraction trees. In: D’Ambra, P., Guarracino, M., Talia, D. (eds.) Euro-Par 2010. LNCS, vol. 6272, pp. 151–162. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  2. 2.
    Basin, D., Fan, R., Keidar, I., Kiselov, O., Perelman, D.: Scalable producer-consumer task pools with adjustable fairness and contention. Technical report, Technion, CCIT 790 (2011)Google Scholar
  3. 3.
    Ellen, F., Lev, Y., Luchangco, V., Moir, M.: Snzi: scalable nonzero indicators. In: PODC 2007: Proceedings of the Twenty-Sixth Annual ACM Symposium on Principles of Distributed Computing, pp. 13–22 (2007)Google Scholar
  4. 4.
    Goodman, J.R., Vernon, M.K., Woest, P.J.: 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, pp. 64–75 (1989)Google Scholar
  5. 5.
    Herlihy, M., Shavit, N.: The Art of Multiprocessor Programming. Morgan Kaufmann, San Francisco (2008)Google Scholar
  6. 6.
    Ladan-Mozes, E., Shavit, N.: An optimistic approach to lock-free fifo queues. Distributed Computing 20, 323–341 (2008)CrossRefzbMATHGoogle Scholar
  7. 7.
    Michael, M.M., Scott, M.L.: Simple, fast, and practical non-blocking and blocking concurrent queue algorithms. In: Proceedings of the Fifteenth Annual ACM Symposium on Principles of Distributed Computing, PODC 1996, pp. 267–275 (1996)Google Scholar
  8. 8.
    Moir, M., Nussbaum, D., Shalev, O., Shavit, N.: Using elimination to implement scalable and lock-free fifo queues. In: Proceedings of the Seventeenth Annual ACM Symposium on Parallelism in Algorithms and Architectures, SPAA 2005, pp. 253–262 (2005)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Dmitry Basin
    • 1
  • Rui Fan
    • 2
  • Idit Keidar
    • 1
  • Ofer Kiselov
    • 1
  • Dmitri Perelman
    • 1
  1. 1.Department of Electrical EngineeringTechnionHaifaIsrael
  2. 2.School of Computer EngineeringNanyang Technological UniversitySingapore

Personalised recommendations