Abstract
We present new non-blocking array-based shared stack and queue implementations. We sketch proofs of correctness and amortized time analyses for the algorithms. To the best of our knowledge, our stack algorithm is the first practical array-based one and it is the first time that bounded counter values are employed to implement a shared stack and queue. We verify the correctness of our algorithms by the Spin model checker and compare our algorithms to other algorithms experimentally.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Afek, Y., Gafni, E., Morrison, A.: Common2 extended to stacks and unbounded concurrency. In: PODC 2006: Proc. 25th ACM Symposium on Principles of Distributed Computing, pp. 218–227 (2006)
Attiya, H., Fouren, A.: Algorithms adapting to point contention. J. ACM 50(4), 444–468 (2003)
Boehm, H.-J.: An almost non-blocking stack. In: Proc. 23th ACM Symp. on Principles of Distributed Computing, pp. 40–49 (2004)
Colvin, R., Groves, L.: Formal verification of an array-based nonblocking queue. In: ICECCS 2005: Proc. 10th IEEE International Conference on Engineering of Complex Computer Systems, pp. 507–516 (2005)
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)
Hendler, D., Shavit, N., Yerushalmi, L.: A scalable lock-free stack algorithm. In: SPAA 2004: Proc. 16th ACM Symposium on Parallelism in Algorithms and Architectures, pp. 206–215 (2004)
Herlihy, M.: Wait-free synchronization. ACM Trans. Program. Lang. Syst. 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., Luchangco, V., Martin, P., Moir, M.: Nonblocking memory management support for dynamic-sized data structures. ACM Trans. Comput. Syst. 23(2), 146–196 (2005)
Herlihy, M.P., Wing, J.M.: Linearizability: a correctness condition for concurrent objects. ACM Trans. Program. Lang. Syst. 12(3), 463–492 (1990)
Holzmann, G.J.: The model checker SPIN. IEEE Trans. Softw. Eng. 23(5), 279–295 (1997)
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)
Massalin, H., Pu, C.: A lock-free multiprocessor OS kernel. SIGOPS Oper. Syst. Rev. 26(2), 108 (1992)
Michael, M.M., Scott, M.L.: Simple, fast, and practical non-blocking and blocking concurrent queue algorithms. In: Proc. 15th ACM Symposium on Principles of Distributed Computing, pp. 267–275 (1996)
Moir, M., Nussbaum, D., Shalev, O., Shavit, N.: Using elimination to implement scalable and lock-free fifo queues. In: Proc. 17th ACM Symposium on Parallelism in Algorithms and Architectures, pp. 253–262 (2005)
Prakash, S., Lee, Y.H., Johnson, T.: A nonblocking algorithm for shared queues using compare-and-swap. IEEE Trans. Comput. 43(5), 548–559 (1994)
Shafiei, N.: Non-Blocking Array-based Algorithms for Stacks and Queues. Master’s thesis, York University, Toronto, ON, Canada (December 2007)
Shann, C.-H., Huang, T.-L., Chen, C.: A practical nonblocking queue algorithm using compare-and-swap. In: ICPADS 2000: 7th International Conference on Parallel and Distributed Systems, p. 470 (2000)
Shavit, N., Touitou, D.: Elimination trees and the construction of pools and stacks. Theory of Computing Systems 30(6), 545–570 (1997)
Shavit, N., Zemach, A.: Combining funnels: A dynamic approach to software combining. J. Parallel Distrib. Comput. 60(11), 1355–1387 (2000)
Treiber, R.K.: Systems programming: Coping with parallelism. Technical Report RJ 5118, 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. 13th ACM Symp. on Parallel Algorithms and Architectures, pp. 134–143 (2001)
Valois, J.D.: Implementing lock-free queues. In: Proc. 17th International Conference on Parallel and Distributed Computing Systems, pp. 64–69 (1994)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2008 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Shafiei, N. (2008). Non-blocking Array-Based Algorithms for Stacks and Queues. In: Garg, V., Wattenhofer, R., Kothapalli, K. (eds) Distributed Computing and Networking. ICDCN 2009. Lecture Notes in Computer Science, vol 5408. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-92295-7_10
Download citation
DOI: https://doi.org/10.1007/978-3-540-92295-7_10
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-92294-0
Online ISBN: 978-3-540-92295-7
eBook Packages: Computer ScienceComputer Science (R0)