Skip to main content

Non-blocking Array-Based Algorithms for Stacks and Queues

  • Conference paper

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

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.

This is a preview of subscription content, log in via an institution.

Buying options

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

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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)

    Google Scholar 

  2. Attiya, H., Fouren, A.: Algorithms adapting to point contention. J. ACM 50(4), 444–468 (2003)

    Article  MathSciNet  MATH  Google Scholar 

  3. Boehm, H.-J.: An almost non-blocking stack. In: Proc. 23th ACM Symp. on Principles of Distributed Computing, pp. 40–49 (2004)

    Google Scholar 

  4. 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)

    Google Scholar 

  5. 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)

    Chapter  Google Scholar 

  6. 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)

    Google Scholar 

  7. Herlihy, M.: Wait-free synchronization. ACM Trans. Program. Lang. Syst. 13(1), 124–149 (1991)

    Article  Google Scholar 

  8. Herlihy, M.: A methodology for implementing highly concurrent data objects. ACM Trans. Program. Lang. Syst. 15(5), 745–770 (1993)

    Article  Google Scholar 

  9. 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)

    Article  Google Scholar 

  10. Herlihy, M.P., Wing, J.M.: Linearizability: a correctness condition for concurrent objects. ACM Trans. Program. Lang. Syst. 12(3), 463–492 (1990)

    Article  Google Scholar 

  11. Holzmann, G.J.: The model checker SPIN. IEEE Trans. Softw. Eng. 23(5), 279–295 (1997)

    Article  Google Scholar 

  12. 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)

    Chapter  Google Scholar 

  13. Massalin, H., Pu, C.: A lock-free multiprocessor OS kernel. SIGOPS Oper. Syst. Rev. 26(2), 108 (1992)

    Article  Google Scholar 

  14. 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)

    Google Scholar 

  15. 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)

    Google Scholar 

  16. 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)

    Article  Google Scholar 

  17. Shafiei, N.: Non-Blocking Array-based Algorithms for Stacks and Queues. Master’s thesis, York University, Toronto, ON, Canada (December 2007)

    Google Scholar 

  18. 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)

    Google Scholar 

  19. Shavit, N., Touitou, D.: Elimination trees and the construction of pools and stacks. Theory of Computing Systems 30(6), 545–570 (1997)

    Article  MathSciNet  MATH  Google Scholar 

  20. Shavit, N., Zemach, A.: Combining funnels: A dynamic approach to software combining. J. Parallel Distrib. Comput. 60(11), 1355–1387 (2000)

    Article  MATH  Google Scholar 

  21. Treiber, R.K.: Systems programming: Coping with parallelism. Technical Report RJ 5118, IBM Almaden Research Center (April 1986)

    Google Scholar 

  22. 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)

    Google Scholar 

  23. Valois, J.D.: Implementing lock-free queues. In: Proc. 17th International Conference on Parallel and Distributed Computing Systems, pp. 64–69 (1994)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics