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.
Similar content being viewed by others
References
Advanced Synchronization Facility Proposed Architectural Specification (2009). http://developer.amd.com/wordpress/media/2013/09/45432-ASF_Spec_2.1.pdf
Afek, Y., Levy, A., Morrison, A.: Software-improved hardware lock elision. In: PODC. ACM (2014)
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
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
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
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
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
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
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
Brown, T., Ravi, S.: Cost of concurrency in hybrid transactional memory. In: Workshop on Transactional Computing (Transact), 2017 (2017)
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
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)
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
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
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
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
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
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
Ellen, F., Hendler, D., Shavit, N.: On the inherent sequentiality of concurrent objects. SIAM J. Comput. 41(3), 519–536 (2012)
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
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
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
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
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
Guerraoui, R., Kapalka, M.: Principles of Transactional Memory. Synthesis Lectures on Distributed Computing Theory. Morgan and Claypool, San Rafael (2010)
Harris, T., Larus, J.R., Rajwar, R.: Transactional Memory. Synthesis Lectures on Computer Architecture, 2nd edn. Morgan & Claypool Publishers, San Rafael (2010)
Herlihy, M.: Wait-free synchronization. ACM Trans. Progr. Lang. Syst. 13(1), 123–149 (1991)
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
Herlihy, M., Moss, J.E.B.: Transactional memory: architectural support for lock-free data structures. In: ISCA, pp. 289–300 (1993)
Israeli, A., Rappoport, L.: Disjoint-access-parallel implementations of strong shared memory primitives. In: PODC, pp. 151–160 (1994)
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
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
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
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
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
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)
Ohmacht, M.: Memory Speculation of the Blue Gene/Q Compute Chip (2011). http://wands.cse.lehigh.edu/IBM_BQC_PACT2011.ppt
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
Reinders, J.: Transactional Synchronization in Haswell (2012). http://software.intel.com/en-us/blogs/2012/02/07/transactional-synchronization-in-haswell/
Riegel, T.: Software Transactional Memory Building Blocks (2013). Chapter 7. Thesis
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)
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
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
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
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
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
Corresponding author
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
About this article
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
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00446-017-0305-3