Skip to main content

The Baskets Queue

  • Conference paper

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

Abstract

FIFO Queues have over the years been the subject of significant research. Such queues are used as buffers both in a variety of applications, and in recent years as a key tool in buffering data in high speed communication networks.

Overall, the most popular dynamic-memory lock-free FIFO queue algorithm in the literature remains the MS-queue algorithm of Michael and Scott. Unfortunately, this algorithm, as well as many others, offers no more parallelism than that provided by allowing concurrent accesses to the head and tail. In this paper we present the Baskets Queue - a new, highly concurrent lock-free linearizable dynamic memory FIFO queue. The Baskets Queue introduces a new form of parallelism among enqueue operations that creates baskets of mixed-order items instead of the standard totally ordered list. The operations in different baskets can be executed in parallel. Surprisingly however, the end result is a linearizable FIFO queue, and in fact, we show that a basket queue based on the MS-queue outperforms the original MS-queue algorithm in various benchmarks.

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. Tsigas, P., Zhang, Y.: A simple, fast and scalable non-blocking concurrent FIFO queue for shared memory multiprocessor systems. In: Proceedings of the 13th annual ACM symposium on Parallel algorithms and architectures, Crete Island, Greece, pp. 134–143. ACM Press, New York (2001)

    Chapter  Google Scholar 

  2. Valois, J.: Implementing lock-free queues. In: Proceedings of the 7th International Conference on Parallel and Distributed Computing Systems. 64–69 (1994)

    Google Scholar 

  3. Gottlieb, A., Lubachevsky, B.D., Rudolph, L.: Basic techniques for the efficient coordination of very large numbers of cooperating sequential processors. ACM Trans. Program. Lang. Syst. 5(2), 164–189 (1983)

    Article  MATH  Google Scholar 

  4. Herlihy, M., Wing, J.: Linearizability: A Correctness Condition for Concurrent Objects. ACM Transactions on Programming Languages and Systems 12(3), 463–492 (1990), doi:10.1145/78969.78972

    Article  Google Scholar 

  5. Hwang, K., Briggs, F.A.: Computer Architecture and Parallel Processing. McGraw-Hill, New York (1990)

    Google Scholar 

  6. Lamport, L.: Specifying Concurrent Program Modules. ACM Transactions on Programming Languages and Systems 5(2), 190–222 (1983)

    Article  MATH  Google Scholar 

  7. Ladan-Mozes, E., Shavit, N.: An Optimistic Approach to Lock-Free FIFO Queues. In: In: Proceedings of Distributed computing, Amsterdam, Netherlands, pp. 117–131. Springer, Heidelberg (2004)

    Google Scholar 

  8. Mellor-Crummey, J.M.: Concurrent queues: Practical fetch-and-φ algorithms. Technical Report Technical Report 229, University of Rochester(November 1987)

    Google Scholar 

  9. Prakash, S., Lee, Y.H., Johnson, T.: Non-blocking algorithms for concurrent data structures. Technical Report 91–002, Department of Information Sciences, University of Florida(1991)

    Google Scholar 

  10. Prakash, S., Lee, Y.-H., Johnson, T.: A non-blocking algorithm for shared queues using compare-and-swap. IEEE Transactions on Computers 43(5), 548–559 (1994)

    Article  Google Scholar 

  11. Sites, R.: Operating Systems and Computer Architecture. In: Stone, H. (ed.) Introduction to Computer Architecture, 2nd edn. (1980)

    Google Scholar 

  12. Stone, H.S.: High-performance computer architecture. Addison-Wesley Longman Publishing Co., Inc (1987)

    Google Scholar 

  13. Stone, J.: A simple and correct shared-queue algorithm using compare-and-swap. In: Proceedings of the 1990 conference on Supercomputing, pp. 495–504. IEEE Computer Society Press, Los Alamitos (1990)

    Google Scholar 

  14. Stone, J.M.: A Nonblocking Compare-and-Swap Algorithm for a Shared Circular Queue. In: Parallel and Distributed Computing in Engineering Systems, pp. 147–152. Elsevier Science B.V, Amsterdam (1992)

    Google Scholar 

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

    Google Scholar 

  16. Michael, M., Scott, M.: Nonblocking Algorithms and Preemption-Safe Locking on Multiprogrammed Shared - Memory Multiprocessors. Journal of Parallel and Distributed Computing 51(1), 1–26 (1998)

    Article  MATH  Google Scholar 

  17. Lea, D.: The java concurrency package (JSR-166), http://gee.cs.oswego.edu/dl/concurrency-interest/index.html

  18. Moir, M., Nussbaum, D., Shalev, O., Shavit, N.: Using elimination to implement scalable and lock-free FIFO queues. In: SPAA 2005: Proceedings of the 17th annual ACM symposium on Parallelism in algorithms and architectures, pp. 253–262. ACM Press, New York, NY, USA (2005)

    Google Scholar 

  19. Shavit, N., Zemach, A.: Diffracting Trees. ACM Transactions on Computer Systems 14(4), 385–428 (1996)

    Article  Google Scholar 

  20. Herlihy, M., Lim, B., Shavit, N.: Scalable Concurrent Counting. ACM Transactions on Computer Systems 13(4), 343–364 (1995)

    Article  Google Scholar 

  21. Moir, M.: Practical implementations of non-blocking synchronization primitives. In: Proceedings of the 16th Annual ACM Symposium on Principles of Distributed Computing, pp. 219–228. ACM Press, New York (1997)

    Google Scholar 

  22. Cormen, T., Leiserson, C., Rivest, R., Stein, C.: Introduction to Algorithms, 2nd edn. MIT Press, Cambridge, MA (2001)

    MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Eduardo Tovar Philippas Tsigas Hacène Fouchal

Rights and permissions

Reprints and permissions

Copyright information

© 2007 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Hoffman, M., Shalev, O., Shavit, N. (2007). The Baskets Queue. In: Tovar, E., Tsigas, P., Fouchal, H. (eds) Principles of Distributed Systems. OPODIS 2007. Lecture Notes in Computer Science, vol 4878. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-77096-1_29

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-77096-1_29

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-77095-4

  • Online ISBN: 978-3-540-77096-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics