Skip to main content
Log in

Inherent limitations of hybrid transactional memory

  • Published:
Distributed Computing Aims and scope Submit manuscript

Abstract

Several hybrid transactional memory (HyTM) schemes have recently been proposed to complement the fast, but best-effort nature of hardware transactional memory with a slow, reliable software backup. However, the costs of providing concurrency between hardware and software transactions in HyTM are still not well understood. In this paper, we propose a general model for HyTM implementations, which captures the ability of hardware transactions to buffer memory accesses. The model allows us to formally quantify and analyze the amount of overhead (instrumentation) caused by the potential presence of software transactions. We prove that (1) it is impossible to build a strictly serializable HyTM implementation that has both uninstrumented reads and writes, even for very weak progress guarantees, and (2) the instrumentation cost incurred by a hardware transaction in any progressive opaque HyTM is linear in the size of the transaction’s data set. We further describe two implementations which exhibit optimal instrumentation costs for two different progress conditions. In sum, this paper proposes the first formal HyTM model and captures for the first time the trade-off between the degree of hardware-software TM concurrency and the amount of instrumentation overhead.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3

Similar content being viewed by others

References

  1. Advanced Synchronization Facility Proposed Architectural Specification (2009). http://developer.amd.com/wordpress/media/2013/09/45432-ASF_Spec_2.1.pdf

  2. Afek, Y., Levy, A., Morrison, A.: Software-improved hardware lock elision. In: PODC. ACM (2014)

  3. Afek, Y., Matveev, A., Moll, O.R., Shavit, N.: Amalgamated lock-elision. In: Distributed Computing—29th International Symposium, DISC 2015, Tokyo, Japan, October 7–9, 2015, Proceedings, pp. 309–324 (2015). doi:10.1007/978-3-662-48653-5_21

  4. Alistarh, D., Eugster, P., Herlihy, M., Matveev, A., Shavit, N.: Stacktrack: An automated transactional approach to concurrent memory reclamation. In: Proceedings of the Ninth European Conference on Computer Systems, EuroSys ’14, pp. 25:1–25:14. ACM, New York, NY, USA (2014). doi:10.1145/2592798.2592808

  5. Alistarh, D., Kopinsky, J., Kuznetsov, P., Ravi, S., Shavit, N.: Inherent limitations of hybrid transactional memory. In: Distributed Computing—29th International Symposium, DISC 2015, Tokyo, Japan, October 7-9, 2015, Proceedings, pp. 185–199 (2015). doi:10.1007/978-3-662-48653-5_13

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

  7. Attiya, H., Hans, S., Kuznetsov, P., Ravi, S.: Safety of deferred update in transactional memory. In: IEEE 33rd International Conference on Distributed Computing Systems 0, pp. 601–610 (2013). doi:10.1109/ICDCS.2013.57

  8. Attiya, H., Hillel, E.: The cost of privatization in software transactional memory. IEEE Trans. Computers 62(12), 2531–2543 (2013). http://dblp.uni-trier.de/db/journals/tc/tc62.html#AttiyaH13

  9. Attiya, H., Hillel, E., Milani, A.: Inherent limitations on disjoint-access parallel implementations of transactional memory. Theory Comput. Syst. 49(4), 698–719 (2011). doi:10.1007/s00224-010-9304-5

    Article  MathSciNet  MATH  Google Scholar 

  10. Brown, T., Ravi, S.: Cost of concurrency in hybrid transactional memory. In: Workshop on Transactional Computing (Transact), 2017 (2017)

  11. Calciu, I., Gottschlich, J., Shpeisman, T., Pokam, G., Herlihy, M.: Invyswell: a hybrid transactional memory for haswell’s restricted transactional memory. In: International Conference on Parallel Architectures and Compilation, PACT ’14, Edmonton, AB, Canada, August 24-27, 2014, pp. 187–200 (2014). doi:10.1145/2628071.2628086

  12. Calciu, I., Shpeisman, T., Pokam, G., Herlihy, M.: Improved single global lock fallback for best-effort hardware transactional memory. In: Transact 2014 Workshop. ACM (2014)

  13. Dalessandro, L., Carouge, F., White, S., Lev, Y., Moir, M., Scott, M.L., Spear, M.F.: Hybrid NOrec: a case study in the effectiveness of best effort hardware transactional memory. In: R. Gupta, T.C. Mowry (eds.) ASPLOS, pp. 39–52. ACM (2011). http://dblp.uni-trier.de/db/conf/asplos/asplos2011.html#DalessandroCWLMSS11

  14. Dalessandro, L., Spear, M.F., Scott, M.L.: Norec: streamlining stm by abolishing ownership records. SIGPLAN Not. 45(5), 67–78 (2010). doi:10.1145/1837853.1693464

    Article  Google Scholar 

  15. Damron, P., Fedorova, A., Lev, Y., Luchangco, V., Moir, M., Nussbaum, D.: Hybrid transactional memory. SIGPLAN Not. 41(11), 336–346 (2006). doi:10.1145/1168918.1168900

    Article  Google Scholar 

  16. Dice, D., Lev, Y., Moir, M., Nussbaum, D.: Early experience with a commercial hardware transactional memory implementation. In: Proceedings of the 14th International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS XIV, pp. 157–168. ACM, New York, NY, USA (2009). doi:10.1145/1508244.1508263

  17. Dice, D., Shalev, O., Shavit, N.: Transactional locking ii. In: Proceedings of the 20th International Conference on Distributed Computing, DISC’06, pp. 194–208. Springer, Berlin, Heidelberg (2006). doi:10.1007/11864219_14

  18. Dragojević, A., Herlihy, M., Lev, Y., Moir, M.: On the power of hardware transactional memory to simplify memory management. In: Proceedings of the 30th Annual ACM SIGACT-SIGOPS Symposium on Principles of Distributed Computing, PODC ’11, pp. 99–108. ACM, New York, NY, USA (2011). doi:10.1145/1993806.1993821

  19. Ellen, F., Hendler, D., Shavit, N.: On the inherent sequentiality of concurrent objects. SIAM J. Comput. 41(3), 519–536 (2012)

    Article  MathSciNet  MATH  Google Scholar 

  20. Felber, P., Issa, S., Matveev, A., Romano, P.: Hardware read-write lock elision. In: Proceedings of the Eleventh European Conference on Computer Systems, EuroSys ’16, pp. 34:1–34:15. ACM, New York, NY, USA (2016). doi:10.1145/2901318.2901346

  21. Guerraoui, R., Kapalka, M.: On obstruction-free transactions. In: Proceedings of the twentieth annual symposium on Parallelism in algorithms and architectures, SPAA ’08, pp. 304–313. ACM, New York, NY, USA (2008). doi:10.1145/1378533.1378587

  22. Guerraoui, R., Kapalka, M.: On the correctness of transactional memory. In: Proceedings of the 13th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP ’08, pp. 175–184. ACM, New York, NY, USA (2008). doi:10.1145/1345206.1345233

  23. Guerraoui, R., Kapalka, M.: The semantics of progress in lock-based transactional memory. SIGPLAN Not. 44(1), 404–415 (2009). doi:10.1145/1594834.1480931

    Article  MATH  Google Scholar 

  24. Guerraoui, R., Kapalka, M.: Transactional memory: Glimmer of a theory. In: Proceedings of the 21st International Conference on Computer Aided Verification, CAV ’09, pp. 1–15. Springer-Verlag, Berlin, Heidelberg (2009). doi:10.1007/978-3-642-02658-4_1

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

    MATH  Google Scholar 

  26. Harris, T., Larus, J.R., Rajwar, R.: Transactional Memory. Synthesis Lectures on Computer Architecture, 2nd edn. Morgan & Claypool Publishers, San Rafael (2010)

    Google Scholar 

  27. Herlihy, M.: Wait-free synchronization. ACM Trans. Progr. Lang. Syst. 13(1), 123–149 (1991)

    Article  Google Scholar 

  28. 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, PODC ’03, pp. 92–101. ACM, New York, NY, USA (2003). doi:10.1145/872035.872048

  29. Herlihy, M., Moss, J.E.B.: Transactional memory: architectural support for lock-free data structures. In: ISCA, pp. 289–300 (1993)

  30. Israeli, A., Rappoport, L.: Disjoint-access-parallel implementations of strong shared memory primitives. In: PODC, pp. 151–160 (1994)

  31. Karnagel, T., Dementiev, R., Rajwar, R., Lai, K., Legler, T., Schlegel, B., Lehner, W.: Improving in-memory database index performance with intel \({}^{\textregistered }\) transactional synchronization extensions. In: 20th IEEE International Symposium on High Performance Computer Architecture, HPCA 2014, Orlando, FL, USA, February 15-19, 2014, pp. 476–487 (2014). doi:10.1109/HPCA.2014.6835957

  32. Kumar, S., Chu, M., Hughes, C.J., Kundu, P., Nguyen, A.: Hybrid transactional memory. In: Proceedings of the Eleventh ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP ’06, pp. 209–220. ACM, New York, NY, USA (2006). doi:10.1145/1122971.1123003

  33. Kuznetsov, P., Ravi, S.: On the cost of concurrency in transactional memory. In: OPODIS, pp. 112–127 (2011). Full version: http://arxiv.org/abs/1103.1302

  34. Kuznetsov, P., Ravi, S.: Grasping the gap between blocking and non-blocking transactional memories. J. Parallel Distrib. Comput. 101, 1–16 (2017). doi:10.1016/j.jpdc.2016.10.008

    Article  Google Scholar 

  35. Lev, Y., Moir, M., Nussbaum, D.: Phtm: Phased transactional memory. In: In Workshop on Transactional Computing (Transact), 2007. research.sun.com/scalable/pubs/ TRANSACT2007PhTM.pdf

  36. Matveev, A., Shavit, N.: Reduced hardware transactions: a new approach to hybrid transactional memory. In: Proceedings of the 25th ACM symposium on Parallelism in algorithms and architectures, pp. 11–22. ACM (2013)

  37. Ohmacht, M.: Memory Speculation of the Blue Gene/Q Compute Chip (2011). http://wands.cse.lehigh.edu/IBM_BQC_PACT2011.ppt

  38. Rajwar, R., Goodman, J.R.: Speculative lock elision: Enabling highly concurrent multithreaded execution. In: Proceedings of the 34th Annual ACM/IEEE International Symposium on Microarchitecture, MICRO 34, pp. 294–305. IEEE Computer Society, Washington, DC, USA (2001). http://dl.acm.org/citation.cfm?id=563998.564036

  39. Reinders, J.: Transactional Synchronization in Haswell (2012). http://software.intel.com/en-us/blogs/2012/02/07/transactional-synchronization-in-haswell/

  40. Riegel, T.: Software Transactional Memory Building Blocks (2013). Chapter 7. Thesis

  41. Riegel, T., Marlier, P., Nowack, M., Felber, P., Fetzer, C.: Optimizing hybrid transactional memory: The importance of nonspeculative operations. In: Proceedings of the 23rd ACM Symposium on Parallelism in Algorithms and Architectures, pp. 53–64. ACM (2011)

  42. Ruan, W., Spear, M.F.: Hybrid transactional memory revisited. In: Distributed Computing—29th International Symposium, DISC 2015, Tokyo, Japan, October 7–9, 2015, Proceedings, pp. 215–231 (2015). doi:10.1007/978-3-662-48653-5_15

  43. Saha, B., Adl-Tabatabai, A.R., Jacobson, Q.: Architectural support for software transactional memory. In: Proceedings of the 39th Annual IEEE/ACM International Symposium on Microarchitecture, MICRO 39, pp. 185–196. IEEE Computer Society, Washington, DC, USA (2006). doi:10.1109/MICRO.2006.9

  44. Spear, M.F., Shriraman, A., Dalessandro, L., Dwarkadas, S., Scott, M.L.: Nonblocking transactions without indirection using alert-on-update. In: Proceedings of the Nineteenth Annual ACM Symposium on Parallel Algorithms and Architectures, SPAA ’07, pp. 210–220. ACM, New York, NY, USA (2007). doi:10.1145/1248377.1248414

  45. Yoo, R.M., Hughes, C.J., Lai, K., Rajwar, R.: Performance evaluation of intel® transactional synchronization extensions for high-performance computing. In: Proceedings of the International Conference on High Performance Computing, Networking, Storage and Analysis, SC ’13, pp. 19:1–19:11. ACM, New York, NY, USA (2013). doi:10.1145/2503210.2503232

Download references

Acknowledgements

The study was funded by Agence Nationale de la Recherche (Grant No. ANR-14-CE35-0010-01, project DISCMAT), National Science Foundation (Grant Nos. CCF-1217921, CCF-1301926), U.S. Department of Energy (Grant No. IIS-1447786).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Srivatsan Ravi.

Additional information

An earlier version of this work appeared in the Proceedings of the 2015 International Symposium on Distributed Computing (DISC 2015) [5].

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Alistarh, D., Kopinsky, J., Kuznetsov, P. et al. Inherent limitations of hybrid transactional memory. Distrib. Comput. 31, 167–185 (2018). https://doi.org/10.1007/s00446-017-0305-3

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00446-017-0305-3

Keywords

Navigation