Grasping the Gap Between Blocking and Non-Blocking Transactional Memories

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


Transactional memory (TM) is an inherently optimistic synchronization abstraction: it allows concurrent processes to execute sequences of shared-data accesses (transactions) speculatively, with an option of aborting them in the future. Early TM designs avoided using locks and relied on non-blocking synchronization to ensure obstruction-freedom: a transaction that encounters no step contention is not allowed to abort. However, it was later observed that obstruction-free TMs perform poorly and, as a result, state-of-the-art TM implementations are nowadays blocking, allowing aborts because of data conflicts rather than step contention.

In this paper, we explain this shift in the TM practice theoretically, via complexity bounds. We prove a few important lower bounds on obstruction-free TMs. Then we present a lock-based TM implementation that beats all of these lower bounds. In sum, our results exhibit a considerable complexity gap between non-blocking and blocking TM implementations.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Attiya, H., Guerraoui, R., Hendler, D., Kuznetsov, P.: The complexity of obstruction-free implementations. J. ACM 56(4) (2009)Google Scholar
  2. 2.
    Attiya, H., Guerraoui, R., Hendler, D., Kuznetsov, P., Michael, M., Vechev, M.: Laws of order: Expensive synchronization in concurrent algorithms cannot be eliminated. In: POPL, pp. 487–498 (2011)Google Scholar
  3. 3.
    Attiya, H., Hillel, E.: The cost of privatization in software transactional memory. IEEE Trans. Computers 62(12), 2531–2543 (2013)MathSciNetCrossRefGoogle Scholar
  4. 4.
    Attiya, H., Hillel, E., Milani, A.: Inherent limitations on disjoint-access parallel implementations of transactional memory. Theory of Computing Systems 49(4), 698–719 (2011)zbMATHMathSciNetCrossRefGoogle Scholar
  5. 5.
    Dalessandro, L., Spear, M.F., Scott, M.L.: NOrec: streamlining STM by abolishing ownership records. In: PPOPP, pp. 67–78 (2010)Google Scholar
  6. 6.
    Dice, D., Shalev, O., Shavit, N.N.: Transactional locking II. In: Dolev, S. (ed.) DISC 2006. LNCS, vol. 4167, pp. 194–208. Springer, Heidelberg (2006) CrossRefGoogle Scholar
  7. 7.
    Dice, D., Shavit, N.: What really makes transactions fast? In: Transact (2006)Google Scholar
  8. 8.
    Dice, D., Shavit, N.: TLRW: return of the read-write lock. In: SPAA, pp. 284–293 (2010)Google Scholar
  9. 9.
    Ellen, F., Hendler, D., Shavit, N.: On the inherent sequentiality of concurrent objects. SIAM J. Comput. 41(3), 519–536 (2012)zbMATHMathSciNetCrossRefGoogle Scholar
  10. 10.
    Ennals, R.: The lightweight transaction library.
  11. 11.
    Ennals, R.: Software transactional memory should not be obstruction-free (2005)Google Scholar
  12. 12.
    Fraser, K.: Practical lock-freedom. Technical report, Cambridge University Computer Laborotory (2003)Google Scholar
  13. 13.
    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)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. In: Synthesis Lectures on Distributed Computing Theory. Morgan and Claypool (2010)Google Scholar
  16. 16.
    Herlihy, M.: Wait-free synchronization. ACM Trans. Prog. Lang. Syst. 13(1), 123–149 (1991)CrossRefGoogle Scholar
  17. 17.
    Herlihy, M., Luchangco, V., Moir, M.: Obstruction-free synchronization: double-ended queues as an example. In: ICDCS, pp. 522–529 (2003)Google Scholar
  18. 18.
    Herlihy, M., Luchangco, V., Moir, M., Scherer III, W.N.: Software transactional memory for dynamic-sized data structures. In: PODC, pp. 92–101 (2003)Google Scholar
  19. 19.
    Herlihy, M., Shavit, N.: On the nature of progress. In: Fernàndez Anta, A., Lipari, G., Roy, M. (eds.) OPODIS 2011. LNCS, vol. 7109, pp. 313–328. Springer, Heidelberg (2011) CrossRefGoogle Scholar
  20. 20.
    Kuznetsov, P., Ravi, S.: On the cost of concurrency in transactional memory. In: Fernàndez Anta, A., Lipari, G., Roy, M. (eds.) OPODIS 2011. LNCS, vol. 7109, pp. 112–127. Springer, Heidelberg (2011) CrossRefGoogle Scholar
  21. 21.
    Kuznetsov, P., Ravi, S.: Progressive transactional memory in time and space. In: Malyshkin, V. (ed.) PaCT 2015. LNCS, vol. 9251, pp. 410–425. Springer, Heidelberg (2015) CrossRefGoogle Scholar
  22. 22.
    Kuznetsov, P., Ravi, S.: Why transactional memory should not be obstruction-free (2015).
  23. 23.
    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) CrossRefGoogle Scholar
  24. 24.
    McKenney, P.E.: Memory barriers: a hardware view for software hackers. Linux Technology Center, IBM Beaverton, June 2010Google Scholar
  25. 25.
    Perelman, D., Fan, R., Keidar, I.: On maintaining multiple versions in STM. In: PODC, pp. 16–25 (2010)Google Scholar
  26. 26.
    Tabba, F., Moir, M., Goodman, J.R., Hay, A.W., Wang, C.: Nztm: Nonblocking zero-indirection transactional memory. In: SPAA 2009, pp. 204–213. ACM, New York (2009)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2015

Authors and Affiliations

  1. 1.Télécom ParisTechParisFrance
  2. 2.TU BerlinBerlinGermany

Personalised recommendations