Abstract
We present an efficient and practical non-blocking implementation of a concurrent array-based FIFO queue that is suitable for preemptive multi threaded systems. It is well known that concurrent FIFO queues relying on mutual exclusion cause blocking, which have several drawbacks and degrade overall system performance. Link-based non-blocking queue algorithms have a memory management problem whereby a removed node from the queue can neither be freed nor reused because other threads may still be accessing the node. Existing solutions to this problem introduce a fair amount of overhead and are shown to be less efficient compared to array-based algorithms, which inherently do not suffer from this problem. In addition to being independent in advance knowledge of the number of threads that can access the queue, our new algorithm improves on previously proposed algorithms in that it does not re quire any special instruction other than a load-linked/store-conditional atomic instruction operating on pointer-wide number of bits.
This work was partially funded by the University of Applied Science of Western Switzerland (HES-SO) research project no. 15516 RASMAS.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Detlefs, D.L., Martin, P.A., Moir, M., Steele Jr., G.L.: Lock-Free Reference Counting. In: Proc. of the 20th Annual ACM Symposium on Principles of Distributed Computing (PODC 2001), August 2001, pp. 190–199 (2001)
Doherty, S., Herlihy, M., Luchangco, V., Moir, M.: Bringing Practical Lock-Free Synchronization to 64-bit Applications. In: Proc. of the 23rd Annual ACM Symposium on Principles of Distributed Computing (PODC 2004), July 2004, pp. 31–39 (2004)
Herlihy, M.P., Wing, J.M.: Linearizability: A Correctness Condition for Concurrent Objects. ACM Trans. Progrmg. Lang. Syst (TOPLAS) 12(3), 463–492 (1990)
Herlihy, M.P.: Wait-Free Synchronization. ACM Trans. Progrmg. Lang. Syst (TOPLAS) 13(1), 124–149 (1991)
Herlihy, M., Luchangco, V., Moir, M.: The Repeat Offender Problem: A Mechanism for Supporting Dynamic-Sized, Lock-free Data Structures. In: Malkhi, D. (ed.) DISC 2002. LNCS, vol. 2508, pp. 339–353. Springer, Heidelberg (2002)
Herlihy, M.P., Luchangco, V., Moir, M.: Obstruction-Free Synchronization: Double-Ended Queues as an Example. In: Proc. 23rd IEEE Int. Conf. on Dist. Comp. Sys. (ICDCS 2003), Providence, RI, May 2003, pp. 522–529 (2003)
Herlihy, M., Luchangco, V., Moir, M.: Space- and Time-adaptive Nonblocking Algorithms. In: CATS 2003 Proc. of Computing: The Australasian Theory Symposium, April 2003, pp. 260–280 (2003)
Ladan-Mozes, E., Shavit, N.: An Optimistic Approach to Lock-Free FIFO Queues. In: Guerraoui, R. (ed.) DISC 2004. LNCS, vol. 3274, pp. 117–131. Springer, Heidelberg (2004)
Michael, M.M., Scott, M.L.: Correction of a Memory Management Method for Lock-Free Data Structures. Technical Report, Computer Science Department, University of Rochester (1995)
Michael, M.M., Scott, M.L.: Nonblocking Algorithms and Preemption-Safe Locking on Multiprogrammed Shared Memory Multiprocessors. J. Parallel Distrib. Comput. 51(1), 1–26 (1998)
Michael, M.M.: High Performance Dynamic Lock-Free Hash Tables and List-Sets. In: Proc. of the 14th Annual ACM Symposium on Parallel Algorithms and Architectures (SPAA 2001), August 2002, pp. 73–82 (2002)
Michael, M.M.: Hazard Pointers: Safe Memory Reclamation for Lock-Free Objects. IEEE Trans. on Parallel and Distributed Systems 15(6), 491–504 (2004)
Shann, C.-H., Huang, T.-L., Chen, C.: A Practical Nonblocking Queue Algorithm Using Compare-And-Swap. In: Proc. of the 7th International Conf. on Parallel and Distributed Systems (ICPADS 2000), July 2000, pp. 470–475 (2000)
Treiber, R.: Systems Programming: Coping With Parallelism. Technical Report RJ5118, IBM Almaden Research Center (April 1986)
Tsigas, P., Zhang, Y.: A Simple, Fast and Scalable Non-Blocking Concurrent FIFO Queue for Shared Memory Multiprocessor Systems. In: Proc. of the 13th Annual ACM Symposium on Parallel Algorithms and Architectures (SPAA 2001), July 2001, pp. 134–143 (2001)
Valois, J.D.: Lock-Free Linked Lists Using Compare-And-Awap. In: Proc. of the 14th ACM Symposium on Principles of Distributed Computing (PODC 1995), August 1995, pp. 214–222 (1995)
Wing, J.M., Gong, C.: Testing and Verifying Concurrent Objects. J. Parallel Distrib. Comput. 17(1-2), 164–182 (1993)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 2008 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Evéquoz, C. (2008). Practical, Fast and Simple Concurrent FIFO Queues Using Single Word Synchronization Primitives. In: Kordon, F., Vardanega, T. (eds) Reliable Software Technologies – Ada-Europe 2008. Ada-Europe 2008. Lecture Notes in Computer Science, vol 5026. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-68624-8_5
Download citation
DOI: https://doi.org/10.1007/978-3-540-68624-8_5
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-68621-7
Online ISBN: 978-3-540-68624-8
eBook Packages: Computer ScienceComputer Science (R0)