Skip to main content

On the Cost of Concurrency in Transactional Memory

  • Conference paper
Principles of Distributed Systems (OPODIS 2011)

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

Included in the following conference series:

Abstract

The promise of software transactional memory (STM) is to combine an easy-to-use programming interface with an efficient utilization of the concurrent-computing abilities provided by modern machines. But does this combination come with an inherent cost?

We evaluate the cost of concurrency by measuring the amount of expensive synchronization that must be employed in an STM implementation that ensures positive concurrency, i.e., allows for concurrent transaction processing in some executions. We focus on two popular progress conditions that provide positive concurrency: progressiveness and permissiveness.

We show that in permissive STMs, providing a very high degree of concurrency, a transaction may perform a linear number of expensive synchronization patterns with respect to its read-set size. In contrast, progressive STMs provide a very small degree of concurrency but, as we demonstrate, can be implemented using at most one expensive synchronization pattern per transaction. However, we show that even in progressive STMs, a transaction has to “protect” (e.g., by using locks or strong synchronization primitives) a linear amount of data with respect to its write-set size. Our results suggest that achieving high degrees of concurrency in STM implementations may bring a considerable synchronization cost.

The research leading to these results has received funding from the European Union Seventh Framework Programme (FP7/2007-2013) under grant agreement N 238639, ITN project TRANSFORM.

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

Access this chapter

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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Adve, S.V., Gharachorloo, K.: Shared memory consistency models: A tutorial. IEEE Computer 29(12), 66–76 (1996)

    Article  Google Scholar 

  2. Afek, Y., Morrison, A., Tzafrir, M.: View transactions: Transactional model with relaxed consistency checks. In: PODC 2010: Proceedings of the 29th Annual ACM SIGACT-SIGOPS Symposium on Principles of Distributed Computing (2010)

    Google Scholar 

  3. Alpern, B., Schneider, F.B.: Defining liveness. Information Processing Letters 21(4), 181–185 (1985)

    Google Scholar 

  4. Anderson, T.E.: The performance of spin lock alternatives for shared-memory multiprocessors. IEEE Trans. Parallel Distrib. Syst. 1(1), 6–16 (1990)

    Article  Google Scholar 

  5. Attiya, H., Hendler, D.: Time and space lower bounds for implementations using k-cas. IEEE Transactions on Parallel and Distributed Systems 21(2), 162–173 (2010)

    Article  MATH  Google Scholar 

  6. Attiya, H., Guerraoui, R., Hendler, D., Kuznetsov, P., Michael, M.V.M.: Laws of order: Expensive synchronization in concurrent algorithms cannot be eliminated. In: POPL (2011)

    Google Scholar 

  7. Attiya, H., Hillel, E.: Single-Version STMs Can Be Multi-Version Permissive (Extended Abstract). In: Aguilera, M.K., Yu, H., Vaidya, N.H., Srinivasan, V., Choudhury, R.R. (eds.) ICDCN 2011. LNCS, vol. 6522, pp. 83–94. Springer, Heidelberg (2011)

    Chapter  Google Scholar 

  8. Attiya, H., Hillel, E., Milani, A.: Inherent limitations on disjoint-access parallel implementations of transactional memory. In: Proceedings of the Twenty-First Annual Symposium on Parallelism in Algorithms and Architectures, SPAA 2009, pp. 69–78. ACM, New York (2009)

    Chapter  Google Scholar 

  9. Crain, T., Imbs, D., Raynal, M.: Read invisibility, virtual world consistency and permissiveness are compatible. Research Report, ASAP - INRIA - IRISA - CNRS: UMR6074 - INRIA - Institut National des Sciences Appliquées de Rennes - Université de Rennes I (November 2010)

    Google Scholar 

  10. Felber, P., Gramoli, V., Guerraoui, R.: Elastic Transactions. In: Keidar, I. (ed.) DISC 2009. LNCS, vol. 5805, pp. 93–107. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  11. Guerraoui, R., Henzinger, T.A., Singh, V.: Permissiveness in Transactional Memories. In: Taubenfeld, G. (ed.) DISC 2008. LNCS, vol. 5218, pp. 305–319. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  12. Guerraoui, R., Kapalka, M.: On obstruction-free transactions. In: Proceedings of the Twentieth Annual Symposium on Parallelism in Algorithms and Architectures, SPAA 2008, pp. 304–313. ACM, New York (2008)

    Chapter  Google Scholar 

  13. Guerraoui, R., Kapalka, M.: On the correctness of transactional memory. In: PPOPP, pp. 175–184 (2008)

    Google Scholar 

  14. Guerraoui, R., Kapalka, M.: The semantics of progress in lock-based transactional memory. In: POPL, pp. 404–415 (2009)

    Google Scholar 

  15. Guerraoui, R., Kapalka, M.: Principles of Transactional Memory, Synthesis Lectures on Distributed Computing Theory. Morgan and Claypool (2010)

    Google Scholar 

  16. Hendler, D., Incze, I., Shavit, N., Tzafrir, M.: Flat combining and the synchronization-parallelism tradeoff. In: SPAA, pp. 355–364 (2010)

    Google Scholar 

  17. Israeli, A., Rappoport, L.: Disjoint-access-parallel implementations of strong shared memory primitives. In: Proceedings of the Thirteenth Annual ACM Symposium on Principles of Distributed Computing, PODC 1994, pp. 151–160. ACM, New York (1994)

    Chapter  Google Scholar 

  18. Kuznetsov, P., Ravi, S.: On the cost of concurrency in transactional memory. CoRR, abs/1103.1302 (2011)

    Google Scholar 

  19. Lamport, L.: A New Solution of Dijkstra’s Concurrent Programming Problem. Commun. ACM 17(8), 453–455 (1974)

    Article  MathSciNet  MATH  Google Scholar 

  20. Lee, J.: Compilation Techniques for Explicitly Parallel Programs. PhD thesis, Department of Computer Science, University of Illinois at Urbana-Champaign (1999)

    Google Scholar 

  21. McKenney, P.: Concurrent code and expensive instructions. Linux Weekly News (January 2011), http://lwn.net/Articles/423994/

  22. McKenney, P.E.: Memory barriers: a hardware view for software hackers. Linux Technology Center, IBM Beaverton (June 2010)

    Google Scholar 

  23. Papadimitriou, C.H.: The serializability of concurrent database updates. J. ACM 26, 631–653 (1979)

    Article  MathSciNet  MATH  Google Scholar 

  24. Raynal, M.: Algorithms for Mutual Exclusion. MIT Press (1986)

    Google Scholar 

  25. Taubenfeld, G.: The Black-White Bakery Algorithm and Related Bounded-Space, Adaptive, Local-Spinning and FIFO Algorithms. In: Liu, H. (ed.) DISC 2004. LNCS, vol. 3274, pp. 56–70. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2011 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Kuznetsov, P., Ravi, S. (2011). On the Cost of Concurrency in Transactional Memory. In: Fernàndez Anta, A., Lipari, G., Roy, M. (eds) Principles of Distributed Systems. OPODIS 2011. Lecture Notes in Computer Science, vol 7109. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-25873-2_9

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-25873-2_9

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-25872-5

  • Online ISBN: 978-3-642-25873-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics