Skip to main content

The Contention Avoiding Concurrent Priority Queue

  • Conference paper
  • First Online:
Languages and Compilers for Parallel Computing (LCPC 2016)

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

Abstract

Efficient and scalable concurrent priority queues are crucial for the performance of many multicore applications, e.g. for task scheduling and the parallelization of various algorithms. Linearizable concurrent priority queues with traditional semantics suffer from an inherent sequential bottleneck in the head of the queue. This bottleneck is the motivation for some recently proposed priority queues with more relaxed semantics. We present the contention avoiding concurrent priority queue (CA-PQ), a data structure that functions as a linearizable concurrent priority with traditional semantics under low contention, but activates contention avoiding techniques that give it more relaxed semantics when high contention is detected. CA-PQ avoids contention in the head of the queue by removing items in bulk from the global data structure, which also allows it to often serve DelMin operations without accessing memory that is modified by several threads. We show that CA-PQ scales well. Its cache friendly design achieves performance that is twice as fast compared to that of state-of-the-art concurrent priority queues on several instances of a parallel shortest path benchmark.

Research supported in part by the Linnaeus centre of excellence UPMARC (www.upmarc.se).

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 EPUB and 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

Notes

  1. 1.

    The only difference between the low-contention join function described in the CATree paper [14] and the one used to create a non-empty leftmost base node is that the latter uses a forcing Lock call instead of a TryLock call to lock the neighbor. (This cannot cause a deadlock since no other code issues forcing lock calls in the other direction).

  2. 2.

    Results from the AMD machine and from additional scenarios as well as the benchmark code are available at http://www.it.uu.se/research/group/languages/software/ca_pq.

References

  1. Alistarh, D., Kopinsky, J., Li, J., Shavit, N.: The spraylist: a scalable relaxed priority queue. In: Proceedings of 20th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP 2015, pp. 11–20. ACM, New York (2015)

    Google Scholar 

  2. Calciu, I., Mendes, H., Herlihy, M.: The adaptive priority queue with elimination and combining. In: Kuhn, F. (ed.) DISC 2014. LNCS, vol. 8784, pp. 406–420. Springer, Heidelberg (2014). doi:10.1007/978-3-662-45174-8_28

    Google Scholar 

  3. Fatourou, P., Kallimanis, N.D.: Revisiting the combining synchronization technique. In: Proceedings of 17th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP 2012, pp. 257–266. ACM, New York (2012)

    Google Scholar 

  4. Fraser, K.: Practical lock-freedom. Ph.D. thesis, University of Cambridge Computer Laboratory (2004)

    Google Scholar 

  5. Fredman, M.L., Tarjan, R.E.: Fibonacci heaps and their uses in improved network optimization algorithms. J. ACM 34(3), 596–615 (1987)

    Article  MathSciNet  Google Scholar 

  6. Hendler, D., Incze, I., Shavit, N., Tzafrir, M.: Flat combining and the synchronization-parallelism tradeoff. In: Proceedings of 22nd Annual ACM Symposium on Parallelism in Algorithms and Architectures, SPAA 2010, pp. 355–364. ACM, New York (2010)

    Google Scholar 

  7. Hunt, G.C., Michael, M.M., Parthasarathy, S., Scott, M.L.: An efficient algorithm for concurrent priority queue heaps. Inf. Process. Lett. 60(3), 151–157 (1996)

    Article  MathSciNet  MATH  Google Scholar 

  8. Karp, R.M., Zhang, Y.: Randomized parallel algorithms for backtrack search and branch-and-bound computation. J. ACM 40(3), 765–789 (1993)

    Article  MathSciNet  MATH  Google Scholar 

  9. Klaftenegger, D., Sagonas, K., Winblad, K.: Delegation locking libraries for improved performance of multithreaded programs. In: Silva, F., Dutra, I., Santos Costa, V. (eds.) Euro-Par 2014. LNCS, vol. 8632, pp. 572–583. Springer, Heidelberg (2014). doi:10.1007/978-3-319-09873-9_48

    Google Scholar 

  10. Kumar, V., Ramesh, K., Rao, V.N.: Parallel best-first search of state-space graphs: a summary of results. In: AAAI, vol. 88, pp. 122–127 (1988)

    Google Scholar 

  11. Leskovec, J., Krevl, A.: SNAP Datasets: Stanford Large Network Dataset Collection, June 2016. http://snap.stanford.edu/data

  12. Lindén, J., Jonsson, B.: A skiplist-based concurrent priority queue with minimal memory contention. In: Baldoni, R., Nisse, N., Steen, M. (eds.) OPODIS 2013. LNCS, vol. 8304, pp. 206–220. Springer, Heidelberg (2013). doi:10.1007/978-3-319-03850-6_15

    Chapter  Google Scholar 

  13. Rihani, H., Sanders, P., Dementiev, R.: Brief announcement: multiqueues: simple relaxed concurrent priority queues. In: Proceedings of 27th ACM Symposium on Parallelism in Algorithms and Architectures, SPAA 2015, pp. 80–82. ACM, New York (2015)

    Google Scholar 

  14. Sagonas, K., Winblad, K.: Contention adapting search trees. In: 14th International Symposium on Parallel and Distributed Computing, ISPDC, pp. 215–224. IEEE (2015)

    Google Scholar 

  15. Sanders, P.: Randomized priority queues for fast parallel access. J. Parallel Distrib. Comput. 49(1), 86–97 (1998)

    Article  MATH  Google Scholar 

  16. Shavit, N., Lotan, I.: Skiplist-based concurrent priority queues. In: Proceedings of 14th International Parallel and Distributed Processing Symposium, pp. 263–268 (2000)

    Google Scholar 

  17. Sundell, H., Tsigas, P.: Fast and lock-free concurrent priority queues for multi-thread systems. In: 2003 Proceedings of 17th International Symposium Parallel and Distributed Processing Symposium, p. 84, April 2003

    Google Scholar 

  18. Tamir, O., Morrison, A., Rinetzky, N.: A heap-based concurrent priority queue with mutable priorities for faster parallel algorithms. In: Proceedings of Principles of Distributed Systems: 19th International Conference, OPODIS 2015 (2015)

    Google Scholar 

  19. Wimmer, M., Gruber, J., Träff, J.L., Tsigas, P.: The lock-free k-LSM relaxed priority queue. In: Proceedings of 20th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP 2015, pp. 277–278. ACM, New York (2015)

    Google Scholar 

  20. Wimmer, M., Versaci, F., Träff, J.L., Cederman, D., Tsigas, P.: Data structures for task-based priority scheduling. In: Proceedings of 19th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pp. 379–380. ACM, New York (2014)

    Google Scholar 

  21. Zhang, D., Dechev, D.: A lock-free priority queue design based on multi-dimensional linked lists. IEEE Trans. Parallel Distrib. Syst. 27(3), 613–626 (2016)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding authors

Correspondence to Konstantinos Sagonas or Kjell Winblad .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2017 Springer International Publishing AG

About this paper

Cite this paper

Sagonas, K., Winblad, K. (2017). The Contention Avoiding Concurrent Priority Queue. In: Ding, C., Criswell, J., Wu, P. (eds) Languages and Compilers for Parallel Computing. LCPC 2016. Lecture Notes in Computer Science(), vol 10136. Springer, Cham. https://doi.org/10.1007/978-3-319-52709-3_23

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-52709-3_23

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-52708-6

  • Online ISBN: 978-3-319-52709-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics