Advertisement

CAS-Based Lock-Free Algorithm for Shared Deques

  • Maged M. Michael
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2790)

Abstract

This paper presents the first lock-free algorithm for shared double-ended queues (deques) based on the single-address atomic primitives CAS (Compare-and-Swap) or LL/SC (Load-Linked and Store-Conditional). The algorithm can use single-word primitives, if the maximum deque size is static. To allow the deque’s size to be dynamic, the algorithm employs single-address double-width primitives. Prior lock-free algorithms for shared deques depend on the strong DCAS (Double-Compare-and-Swap) atomic primitive, not supported on most processor architectures. The new algorithm offers significant advantages over prior lock-free shared deque algorithms with respect to performance and the strength of required primitives. In turn, lock-free algorithms provide significant reliability and performance advantages over lock-based implementations.

Keywords

Anchor Pointer Memory Management Linearization Point Atomic Block Software Transactional Memory 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Agesen, O., Detlefs, D.L., Flood, C.H., Garthwaite, A.T., Martin, P., Shavit, N.N., Steele Jr., G.L.: DCAS-based concurrent deques. In: Proceedings of the 12th Annual ACM Symposium on Parallel Algorithms and Architectures, July 2000, pp. 137–146 (2000)Google Scholar
  2. 2.
    Arora, N.S., Blumofe, R.D., Plaxton, C.G.: Thread scheduling for multiprogrammed multiprocessors. In: Proceedings of the 10th Annual ACM Symposium on Parallel Algorithms and Architectures, June 1998, pp. 119–129 (1998)Google Scholar
  3. 3.
    Attiya, H., Dagan, E.: Improved implementations of binary universal operations. Journal of the ACM 48(5), 1013–1037 (2001)CrossRefMathSciNetGoogle Scholar
  4. 4.
    Detlefs, D.L., Flood, C.H., Garthwaite, A.T., Martin, P., Shavit, N.N., Steele Jr, G.L.: Even better dcas-based concurrent deques. In: Herlihy, M.P. (ed.) DISC 2000. LNCS, vol. 1914, pp. 59–73. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  5. 5.
    Greenwald, M.B.: Non-Blocking Synchronization and System Design. PhD thesis, Stanford University (August 1999)Google Scholar
  6. 6.
    Harris, T.L.: A pragmatic implementation of non-blocking linked lists. In: Welch, J.L. (ed.) DISC 2001. LNCS, vol. 2180, pp. 300–314. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  7. 7.
    Hendler, D., Shavit, N.: Non-blocking steal-half work queues. In: Proceedings of the 21st Annual ACM Symposium on Principles of Distributed Computing, July 2002, pp. 280–289 (2002)Google Scholar
  8. 8.
    Herlihy, M.P.: A methodology for implementing highly concurrent objects. ACM Transactions on Programming Languages and Systems 15(5), 745–770 (1993)CrossRefGoogle Scholar
  9. 9.
    IBM. IBM System/370 Extended Architecture, Principles of Operation, Publication No. SA22-7085 (1983)Google Scholar
  10. 10.
    Israeli, A., Rappoport, L.: Disjoint-access-parallel implementations of strong shared memory primitives. In: Proceedings of the 13th Annual ACM Symposium on Principles of Distributed Computing, August 1994, pp. 151–160 (1994)Google Scholar
  11. 11.
    Knuth, D.E.: The Art of Computer Programming. Fundamental Algorithms, vol. 1. Addison-Wesley, Reading (1968)zbMATHGoogle Scholar
  12. 12.
    Michael, M.M.: High performance dynamic lock-free hash tables and list-based sets. In: Proceedings of the 14th Annual ACM Symposium on Parallel Algorithms and Architectures, August 2002, pp. 73–82 (2002)Google Scholar
  13. 13.
    Michael, M.M.: Safe memory reclamation for dynamic lock-free objects using atomic reads and writes. In: Proceedings of the 21st Annual ACM Symposium on Principles of Distributed Computing, July 2002, pp. 21–30 (2002)Google Scholar
  14. 14.
    Michael, M.M., Scott, M.L.: Simple, fast, and practical non-blocking and blocking concurrent queue algorithms. In: Proceedings of the 15th Annual ACM Symposium on Principles of Distributed Computing, May 1996, pp. 267–275 (1996)Google Scholar
  15. 15.
    Prakash, S., Lee, Y.-H., Johnson, T.: A nonblocking algorithm for shared queues using compare-and-swap. IEEE Transactions on Computers 43(5), 548–559 (1994)CrossRefGoogle Scholar
  16. 16.
    Shalev, O., Shavit, N.: Split-ordered lists: Lock-free extensible hash tables. In: Proceedings of the 22nd Annual ACM Symposium on Principles of Distributed Computing (July 2003)Google Scholar
  17. 17.
    Shavit, N., Touitou, D.: Software transactional memory. Distributed Computing 10(2), 99–116 (1997)CrossRefGoogle Scholar
  18. 18.
    Sundell, H., Tsigas, P.: Fast and lock-free concurrent priority queues for multi-thread systems. In: Proceedings of the 17th International Parallel and Distributed Processing Symposium (April 2003)Google Scholar
  19. 19.
    Valois, J.D.: Implementing lock-free queues. In: Proceedings of the Seventh International Conference on Parallel and Distributed Computing Systems, October 1994, pp. 64–69 (1994)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2003

Authors and Affiliations

  • Maged M. Michael
    • 1
  1. 1.IBM Thomas J. Watson Research CenterYorktown HeightsUSA

Personalised recommendations