The Contention Avoiding Concurrent Priority Queue

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, 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.

References

  1. 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. 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. 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. 4.
    Fraser, K.: Practical lock-freedom. Ph.D. thesis, University of Cambridge Computer Laboratory (2004)Google Scholar
  5. 5.
    Fredman, M.L., Tarjan, R.E.: Fibonacci heaps and their uses in improved network optimization algorithms. J. ACM 34(3), 596–615 (1987)MathSciNetCrossRefGoogle Scholar
  6. 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. 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)MathSciNetCrossRefMATHGoogle Scholar
  8. 8.
    Karp, R.M., Zhang, Y.: Randomized parallel algorithms for backtrack search and branch-and-bound computation. J. ACM 40(3), 765–789 (1993)MathSciNetCrossRefMATHGoogle Scholar
  9. 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. 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. 11.
    Leskovec, J., Krevl, A.: SNAP Datasets: Stanford Large Network Dataset Collection, June 2016. http://snap.stanford.edu/data
  12. 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 CrossRefGoogle Scholar
  13. 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. 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. 15.
    Sanders, P.: Randomized priority queues for fast parallel access. J. Parallel Distrib. Comput. 49(1), 86–97 (1998)CrossRefMATHGoogle Scholar
  16. 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. 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 2003Google Scholar
  18. 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. 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. 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. 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)CrossRefGoogle Scholar

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  1. 1.Department of Information TechnologyUppsala UniversityUppsalaSweden

Personalised recommendations