Skip to main content

Transactional Locking II

  • Conference paper

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

Abstract

The transactional memory programming paradigm is gaining momentum as the approach of choice for replacing locks in concurrent programming. This paper introduces the transactional locking II (TL2) algorithm, a software transactional memory (STM) algorithm based on a combination of commit-time locking and a novel global version-clock based validation technique. TL2 improves on state-of-the-art STMs in the following ways: (1) unlike all other STMs it fits seamlessly with any system’s memory life-cycle, including those using malloc/free (2) unlike all other lock-based STMs it efficiently avoids periods of unsafe execution, that is, using its novel version-clock validation, user code is guaranteed to operate only on consistent memory states, and (3) in a sequence of high performance benchmarks, while providing these new properties, it delivered overall performance comparable to (and in many cases better than) that of all former STM algorithms, both lock-based and non-blocking. Perhaps more importantly, on various benchmarks, TL2 delivers performance that is competitive with the best hand-crafted fine-grained concurrent structures. Specifically, it is ten-fold faster than a single lock. We believe these characteristics make TL2 a viable candidate for deployment of transactional memory today, long before hardware transactional support is available.

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   84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   109.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. Herlihy, M., Moss, E.: Transactional memory: Architectural support for lock-free data structures. In: Proceedings of the Twentieth Annual International Symposium on Computer Architecture (1993)

    Google Scholar 

  2. Rajwar, R., Herlihy, M., Lai, K.: Virtualizing transactional memory. In: ISCA 2005: Proceedings of the 32nd Annual International Symposium on Computer Architecture, pp. 494–505. IEEE Computer Society, Los Alamitos (2005)

    Google Scholar 

  3. Ananian, C.S., Asanovic, K., Kuszmaul, B.C., Leiserson, C.E., Lie, S.: Unbounded transactional memory. In: HPCA 2005: Proceedings of the 11th International Symposium on High-Performance Computer Architecture, Washington, DC, USA, pp. 316–327. IEEE Computer Society, Los Alamitos (2005)

    Google Scholar 

  4. Hammond, L., Wong, V., Chen, M., Carlstrom, B.D., Davis, J.D., Hertzberg, B., Prabhu, M.K., Wijaya, H., Kozyrakis, C., Olukotun, K.: Transactional memory coherence and consistency. In: ISCA 2004: Proceedings of the 31st annual international symposium on Computer architecture, Washington, DC, USA, p. 102. IEEE Computer Society, Los Alamitos (2004)

    Chapter  Google Scholar 

  5. Ennals, R.: Software transactional memory should not be obstruction-free (2005), http://www.cambridge.intel-research.net/~rennals/notlockfree.pdf

  6. Harris, T., Fraser, K.: Concurrent programming without locks (2004), www.cl.cam.ac.uk/Research/SRG/netos/papers/2004-cpwl-submission.pdf

  7. Herlihy, M.: The SXM software package (2005), http://www.cs.brown.edu/~mph/SXM/README.doc

  8. Herlihy, M., Luchangco, V., Moir, M., Scherer, W.: Software transactional memory for dynamic data structures. In: Proceedings of the 22nd Annual ACM Symposium on Principles of Distributed Computing (2003)

    Google Scholar 

  9. Marathe, V.J., Scherer III, W.N., Scott, M.L.: Adaptive software transactional memory. In: Fraigniaud, P. (ed.) DISC 2005. LNCS, vol. 3724, pp. 354–368. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  10. Moir, M.: HybridTM: Integrating hardware and software transactional memory. Technical Report Archivist 2004-0661, Sun Microsystems Research (2004)

    Google Scholar 

  11. Saha, B., Adl-Tabatabai, A.R., Hudson, R.L., Minh, C.C., Hertzberg, B.: A high performance software transactional memory system for a multi-core runtime. In: PPoPP 2006 (to appear, 2006)

    Google Scholar 

  12. Shavit, N., Touitou, D.: Software transactional memory. Distributed Computing 10(2), 99–116 (1997)

    Article  Google Scholar 

  13. Welc, A., Jagannathan, S., Hosking, A.L.: Transactional monitors for concurrent objects. In: Odersky, M. (ed.) ECOOP 2004. LNCS, vol. 3086, pp. 518–541. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  14. Ananian, C.S., Rinard, M.: Efficient software transactions for object-oriented languages. In: Proceedings of Synchronization and Concurrency in Object-Oriented Languages (SCOOL). ACM, New York (2005)

    Google Scholar 

  15. Marathe, V.J., Scherer, W.N., Scott, M.L.: Design tradeoffs in modern software transactional memory systems. In: LCR 2004: Proceedings of the 7th workshop on Workshop on languages, compilers, and run-time support for scalable systems, pp. 1–7. ACM Press, New York (2004)

    Chapter  Google Scholar 

  16. Rajwar, R., Hill, M.: Transactional memory online (2006), http://www.cs.wisc.edu/trans-memory

  17. Harris, T., Fraser, K.: Language support for lightweight transactions. SIGPLAN Not. 38(11), 388–402 (2003)

    Article  Google Scholar 

  18. Dice, D., Shavit, N.: What really makes transactions fast? In: TRANSACT 2006 ACM Workshop (2006)

    Google Scholar 

  19. Afek, Y., Attiya, H., Dolev, D., Gafni, E., Merritt, M., Shavit, N.: Atomic snapshots of shared memory. J. ACM 40(4), 873–890 (1993)

    Article  MATH  Google Scholar 

  20. Thomasian, A.: Concurrency control: methods, performance, and analysis. ACM Comput. Surv. 30(1), 70–119 (1998)

    Article  Google Scholar 

  21. Riegel, T., Felber, P., Fetzer, C.: A lazy snapshot algorithm with eager validation. In: Dolev, S. (ed.) DISC 2006. LNCS, vol. 4167, pp. 284–298. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  22. Agesen, O., Detlefs, D., Garthwaite, A., Knippel, R., Ramakrishna, Y.S., White, D.: An efficient meta-lock for implementing ubiquitous synchronization. ACM SIGPLAN Notices 34(10), 207–222 (1999)

    Article  Google Scholar 

  23. Dice, D.: Implementing fast java monitors with relaxed-locks. In: Java Virtual Machine Research and Technology Symposium, USENIX, pp. 79–90 (2001)

    Google Scholar 

  24. Bloom, B.H.: Space/time trade-offs in hash coding with allowable errors. Commun. ACM 13(7), 422–426 (1970)

    Article  MATH  Google Scholar 

  25. Herlihy, M., Luchangco, V., Moir, M., Scherer III, W.N.: Software transactional memory for dynamic-sized data structures. In: Proceedings of the twenty-second annual symposium on Principles of distributed computing, pp. 92–101. ACM Press, New York (2003)

    Chapter  Google Scholar 

  26. Cormen, T.H., Leiserson, C.E., Rivest, R.L.: Introduction to Algorithms. MIT Press, Cambridge (1990) COR th 01:1 1.Ex

    MATH  Google Scholar 

  27. Hanke, S.: The performance of concurrent red-black tree algorithms. In: Vitter, J.S., Zaroliagis, C.D. (eds.) WAE 1999. LNCS, vol. 1668, pp. 286–300. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2006 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Dice, D., Shalev, O., Shavit, N. (2006). Transactional Locking II. In: Dolev, S. (eds) Distributed Computing. DISC 2006. Lecture Notes in Computer Science, vol 4167. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11864219_14

Download citation

  • DOI: https://doi.org/10.1007/11864219_14

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-44624-8

  • Online ISBN: 978-3-540-44627-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics