Efficiently Implementing a Large Number of LL/SC Objects

  • Prasad Jayanti
  • Srdjan Petrovic
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3974)

Abstract

Over the past decade, a pair of instructions called load-linked (LL) and store-conditional (SC) have emerged as the most suitable synchronization instructions for the design of lock-free algorithms. However, current architectures do not support these instructions; instead, they support either CAS (e.g., UltraSPARC, Itanium) or restricted versions of LL/SC (e.g., POWER4, MIPS, Alpha). Thus, there is a gap between what algorithm designers want (namely, LL/SC) and what multiprocessors actually support (namely, CAS or RLL/RSC). To bridge this gap, a flurry of algorithms that implement LL/SC from CAS have appeared in the literature. The two most recent algorithms are due to Doherty, Herlihy, Luchangco, and Moir (2004) and Michael (2004). To implement M LL/SC objects shared by N processes, Doherty et al.’s algorithm uses only O(N + M) space, but is only non-blocking and not wait-free. Michael’s algorithm, on the other hand, is wait-free, but uses O(N2 + M) space. The main drawback of his algorithm is the time complexity of the SC operation: although the expected amortized running time of SC is only O(1), the worst-case running time of SC is O(N2). The algorithm in this paper overcomes this drawback. Specifically, we design a wait-free algorithm that achieves a space complexity of O(N2 + M), while still maintaining the O(1) worst-case running time for LL and SC operations.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Herlihy, M.P.: Wait-free synchronization. ACM TOPLAS 13(1), 124–149 (1991)CrossRefGoogle Scholar
  2. 2.
    Lamport, L.: Concurrent reading and writing. Communications of the ACM 20(11), 806–811 (1977)MathSciNetCrossRefMATHGoogle Scholar
  3. 3.
    Peterson, G.L.: Concurrent reading while writing. ACM TOPLAS 5(1), 56–65 (1983)CrossRefMATHGoogle Scholar
  4. 4.
    Herlihy, M., Luchangco, V., Moir, M.: Obstruction-free synchronization: Double-ended queues as an example. In: Proceedings of the 23rd International Conference on Distributed Computing Systems (2003)Google Scholar
  5. 5.
    International, S.: The SPARC Architecture Manual, Version 9Google Scholar
  6. 6.
    Corporation, I.: Intel® Itanium® Architecture Software Developer’s Manual, vol. 1: Application Architecture, Revision 2.1 (2002)Google Scholar
  7. 7.
    Group, I.S.: IBM e server POWER4 System Microarchitecture (2001)Google Scholar
  8. 8.
    Systems, M.C.: MIPS64TMArchitecture For Programmers, vol. II: The MIPS64TMInstruction Set, Revision 1.00 (2002)Google Scholar
  9. 9.
    Site, R.: Alpha Architecture Reference Manual. Digital Equipment Corporation (1992)Google Scholar
  10. 10.
    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 (1997)Google Scholar
  11. 11.
    Center, I.T.W.R.: System/370 Principles of operation. Order Number GA22-7000 (1983)Google Scholar
  12. 12.
    Anderson, J., Moir, M.: Universal constructions for large objects. In: Helary, J.-M., Raynal, M. (eds.) WDAG 1995. LNCS, vol. 972, pp. 168–182. Springer, Heidelberg (1995)CrossRefGoogle Scholar
  13. 13.
    Anderson, J., Moir, M.: Universal constructions for multi-object operations. In: Proceedings of the 14th Annual ACM Symposium on Principles of Distributed Computing, pp. 184–194 (1995)Google Scholar
  14. 14.
    Doherty, S., Herlihy, M., Luchangco, V., Moir, M.: Bringing practical lock-free synchronization to 64-bit applications. In: Proceedings of the 23rd Annual ACM Symposium on Principles of Distributed Computing, pp. 31–39 (2004)Google Scholar
  15. 15.
    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, pp. 151–160 (1994)Google Scholar
  16. 16.
    Jayanti, P., Petrovic, S.: Efficient wait-free implementation of multiword LL/SC variables. In: Proceedings of the 25th International Conference on Distributed Computing Systems (2005)Google Scholar
  17. 17.
    Jayanti, P., Petrovic, S.: Efficient and practical constructions of LL/SC variables. In: Proceedings of the 22nd ACM Symposium on Principles of Distributed Computing (2003)Google Scholar
  18. 18.
    Luchangco, V., Moir, M., Shavit, N.: Nonblocking k-compare-single-swap. In: Proceedings of the fifteenth annual ACM symposium on Parallel algorithms and architectures, pp. 314–323 (2003)Google Scholar
  19. 19.
    Michael, M.: Practical lock-free and wait-free LL/SC/VL implementations using 64-bit CAS. In: Guerraoui, R. (ed.) DISC 2004. LNCS, vol. 3274, pp. 144–158. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  20. 20.
    Chandra, T.D., Jayanti, P., Tan, K.Y.: A polylog time wait-free construction for closed objects. In: Proceedings of the 17th Annual Symposium on Principles of Distributed Computing, pp. 287–296 (1998)Google Scholar
  21. 21.
    Jayanti, P.: An optimal multi-writer snapshot algorithm. In: Proceedings of the 37th ACM Symposium on Theory of Computing (2005)Google Scholar
  22. 22.
    Jayanti, P.: f-arrays: implementation and applications. In: Proceedings of the 21st Annual Symposium on Principles of Distributed Computing, pp. 270–279 (2002)Google Scholar
  23. 23.
    Herlihy, M., Wing, J.: Linearizability: A correctness condition for concurrent objects. ACM TOPLAS 12(3), 463–492 (1990)CrossRefGoogle Scholar
  24. 24.
    Jayanti, P., Petrovic, S.: Efficiently implementing a large number of ll/sc objects. Technical Report TR 2005 562, Dartmouth College Computer Science Department (2005)Google Scholar
  25. 25.
    Herlihy, M.: A methodology for implementing highly concurrent data structures. ACM Transactions on Programming Languages and Systems 15(5), 745–770 (1993)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Prasad Jayanti
    • 1
  • Srdjan Petrovic
    • 1
  1. 1.Department of Computer ScienceDartmouth CollegeHanoverUSA

Personalised recommendations