On the Cost of Concurrency in Transactional Memory

  • Petr Kuznetsov
  • Srivatsan Ravi
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7109)


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.


Base Object Read Operation Transactional Memory Progress Condition 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.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Adve, S.V., Gharachorloo, K.: Shared memory consistency models: A tutorial. IEEE Computer 29(12), 66–76 (1996)CrossRefGoogle Scholar
  2. 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. 3.
    Alpern, B., Schneider, F.B.: Defining liveness. Information Processing Letters 21(4), 181–185 (1985)Google Scholar
  4. 4.
    Anderson, T.E.: The performance of spin lock alternatives for shared-memory multiprocessors. IEEE Trans. Parallel Distrib. Syst. 1(1), 6–16 (1990)CrossRefGoogle Scholar
  5. 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)CrossRefzbMATHGoogle Scholar
  6. 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. 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)CrossRefGoogle Scholar
  8. 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)CrossRefGoogle Scholar
  9. 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. 10.
    Felber, P., Gramoli, V., Guerraoui, R.: Elastic Transactions. In: Keidar, I. (ed.) DISC 2009. LNCS, vol. 5805, pp. 93–107. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  11. 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)CrossRefGoogle Scholar
  12. 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)CrossRefGoogle Scholar
  13. 13.
    Guerraoui, R., Kapalka, M.: On the correctness of transactional memory. In: PPOPP, pp. 175–184 (2008)Google Scholar
  14. 14.
    Guerraoui, R., Kapalka, M.: The semantics of progress in lock-based transactional memory. In: POPL, pp. 404–415 (2009)Google Scholar
  15. 15.
    Guerraoui, R., Kapalka, M.: Principles of Transactional Memory, Synthesis Lectures on Distributed Computing Theory. Morgan and Claypool (2010)Google Scholar
  16. 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. 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)CrossRefGoogle Scholar
  18. 18.
    Kuznetsov, P., Ravi, S.: On the cost of concurrency in transactional memory. CoRR, abs/1103.1302 (2011)Google Scholar
  19. 19.
    Lamport, L.: A New Solution of Dijkstra’s Concurrent Programming Problem. Commun. ACM 17(8), 453–455 (1974)MathSciNetCrossRefzbMATHGoogle Scholar
  20. 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. 21.
    McKenney, P.: Concurrent code and expensive instructions. Linux Weekly News (January 2011),
  22. 22.
    McKenney, P.E.: Memory barriers: a hardware view for software hackers. Linux Technology Center, IBM Beaverton (June 2010)Google Scholar
  23. 23.
    Papadimitriou, C.H.: The serializability of concurrent database updates. J. ACM 26, 631–653 (1979)MathSciNetCrossRefzbMATHGoogle Scholar
  24. 24.
    Raynal, M.: Algorithms for Mutual Exclusion. MIT Press (1986)Google Scholar
  25. 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)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Petr Kuznetsov
    • 1
  • Srivatsan Ravi
    • 1
  1. 1.Deutsche Telekom LaboratoriesTU BerlinGermany

Personalised recommendations