Abstract
The priority queue with DeleteMin and Insert operations is a classical interface for ordering items associated with priorities. Some important algorithms, such as Dijkstra’s single-source-shortest-path, Adaptive Huffman Trees, etc. also require changing the priorities of items in the runtime. Existing lock-free priority queues do not directly support the dynamic mutation of the priorities. This paper presents the first concurrent lock-free unbounded binary heap that implements a priority queue with mutable priorities. The operations are provably linearizable. We also designed an optimized version of the algorithm by combining the concurrent operations that substantially improves the performance. For experimental evaluation, we implemented the algorithm in both C/C++ and Java. A number of micro-benchmarks show that our algorithm performs well in comparison to existing implementations.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
In this work, by a heap we mean a binary heap.
- 2.
SC2 which validates and writes to two disjoint memory locations atomically.
- 3.
In our implementation, the Insert operations never returns a \(null\) or fails to make any change due to the reason of finding the heap full. The heap is never full as long as we have sufficient system memory available.
References
Alistarh, D., Kopinsky, J., Li, J., Shavit, N.: The spraylist: a scalable relaxed priority queue. In: ACM SIGPLAN Notices, vol. 50, pp. 11–20. ACM (2015)
Barnes, G.: A method for implementing lock-free shared-data structures. In: 5th SPAA, pp. 261–270 (1993)
Barnes, G.: Wait-free Algoritzms for Heaps. Department of Computer Science and Engineering, University of Washington (1994)
David, T., Guerraoui, R., Trigonakis, V.: Asynchronized concurrency: The secret to scaling concurrent search data structures. In: 20th ASPLOS, pp. 631–644 (2015)
de Moura, L., Bjørner, N.: Z3: an efficient SMT solver. In: Ramakrishnan, C.R., Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 337–340. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-78800-3_24
Dechev, D., Pirkelbauer, P., Stroustrup, B.: Lock-free dynamically resizable arrays. In: Shvartsman, M.M.A.A. (ed.) OPODIS 2006. LNCS, vol. 4305, pp. 142–156. Springer, Heidelberg (2006). https://doi.org/10.1007/11945529_11
Dijkstra, E.W.: A note on two problems in connexion with graphs. Numer. Math. 1(1), 269–271 (1959)
Dragicevic, K., Bauer, D.: Optimization techniques for concurrent STM-based implementations: a concurrent binary heap as a case study. In: 23rd IPDPS, pp. 1–8 (2009)
Fraser, K.: Practical lock-freedom. Ph.D. thesis, University of Cambridge (2004)
Fujimoto, R.M.: Parallel discrete event simulation. Commun. ACM 33(10), 30–53 (1990)
Gidenstam, A., Papatriantafilou, M., Sundell, H., Tsigas, P.: Efficient and reliable lock-free memory reclamation based on reference counting. IEEE Trans. Parallel Distrib. Syst. 20(8), 1173–1187 (2009)
Hendler, D., Shavit, N., Yerushalmi, L.: A scalable lock-free stack algorithm. In: 16th SPAA, SPAA 2004, pp. 206–215 (2004)
Henry, G.J.: The unix system: the fair share scheduler. AT&T Bell Lab. Tech. J. 63(8), 1845–1857 (1984)
Herlihy, M.: Wait-free synchronization. ACM TOPLAS 13(1), 124–149 (1991)
Herlihy, M.: A methodology for implementing highly concurrent data objects. ACM Trans. Program. Lang. Syst. 15(5), 745–770 (1993)
Herlihy, M.P., Wing, J.M.: Linearizability: a correctness condition for concurrent objects. ACM TOPLAS 12(3), 463–492 (1990)
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)
Israeli, A., Rappoport, L.: Efficient wait-free implementation of a concurrent priority queue. In: Schiper, A. (ed.) WDAG 1993. LNCS, vol. 725, pp. 1–17. Springer, Heidelberg (1993). https://doi.org/10.1007/3-540-57271-6_23
Michael, M.M.: Hazard pointers: safe memory reclamation for lock-free objects. IEEE Trans. Parallel Distrib. Syst. 15(6), 491–504 (2004)
Prim, R.C.: Shortest connection networks and some generalizations. Bell Labs Tech. J. 36(6), 1389–1401 (1957)
Shavit, N., Lotan, I.: Skiplist-based concurrent priority queues. In: 14th IPDPS, pp. 263–268. IEEE (2000)
Shavit, N., Touitou, D.: Software transactional memory. Distrib. Comput. 10(2), 99–116 (1997)
Sundell, H., Tsigas, P.: Fast and lock-free concurrent priority queues for multi-thread systems. J. Parallel Distrib. Comput. 65(5), 609–627 (2005)
Tamir, O., Morrison, A., Rinetzky, N.: A heap-based concurrent priority queue with mutable priorities for faster parallel algorithms. In: 19th OPODIS (2016)
Vitter, J.S.: Design and analysis of dynamic huffman codes. J. ACM (JACM) 34(4), 825–845 (1987)
Walulya, I., Chatterjee, B., Datta, A.K., Niyoliya, R., Tsigas, P.: Concurrent lock-free unbounded priority queue with mutable priorities. Technical report, 2018:06, ISNN 1652–926X, Department of Computer Science and Engineering, Chalmers University of Technology (2018)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer Nature Switzerland AG
About this paper
Cite this paper
Walulya, I., Chatterjee, B., Datta, A.K., Niyolia, R., Tsigas, P. (2018). Concurrent Lock-Free Unbounded Priority Queue with Mutable Priorities. In: Izumi, T., Kuznetsov, P. (eds) Stabilization, Safety, and Security of Distributed Systems. SSS 2018. Lecture Notes in Computer Science(), vol 11201. Springer, Cham. https://doi.org/10.1007/978-3-030-03232-6_24
Download citation
DOI: https://doi.org/10.1007/978-3-030-03232-6_24
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-03231-9
Online ISBN: 978-3-030-03232-6
eBook Packages: Computer ScienceComputer Science (R0)