Hybrid Transactional Memory with Pessimistic Concurrency Control

  • Enrique Vallejo
  • Sutirtha Sanyal
  • Tim Harris
  • Fernando Vallejo
  • Ramón Beivide
  • Osman Unsal
  • Adrián Cristal
  • Mateo Valero
Article

Abstract

Transactional Memory (TM) intends to simplify the design and implementation of the shared-memory data structures used in parallel software. Many Software TM systems are based on writer-locks to protect the data being modified. Such implementations can suffer from the “privatization” problem, in which transactional and non-transactional accesses to the same location can lead to inconsistent results. One solution is the use of Pessimistic Concurrency Control, but it entails an important performance penalty due to the need of reader-writer locking. In this paper a hybrid TM design is proposed to reduce the performance overheads caused by the use of these locks while combining three desirable features: (i) full TM functionality whether or not the architectural support is present; (ii) execution of a single common code path in software or hardware; and, (iii) immunity from the privatization problem. The analysis shows how a Hybrid TM can lose important properties, such as starvation freedom. To overcome this issue, Directory Reservations is presented, a low-cost mechanism improving existent solutions designed for Hardware TM.

Keywords

Hybrid transactional memory Pessimistic concurrency control Writer starvation Directory reservation 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Bobba, J., Moore, K.E., Volos, H., Yen, L., Hill, M.D., Swift, M.M., Wood, D.A.: Performance pathologies in hardware transactional memory. In: International Symposium on Computer Architecture (ISCA) (2007, June)Google Scholar
  2. 2.
    Blundell, C., Lewis, E.C., Martin, M.M.K.: Subtleties of transactional memory atomicity semantics. IEEE Computer Architecture Letters 5(2) (2006, July)Google Scholar
  3. 3.
    Ceze, L., Tuck, J., Cascaval, C., Torrellas, J.: Bulk disambiguation of speculative threads in multiprocessors. In: The Proceedings of the 33rd International Symposium on Computer Architecture (ISCA) (2006, June)Google Scholar
  4. 4.
    Damron, P., Fedorova, A., Lev, Y., Luchangco, V., Moir, M., Nussbaum, D.: Hybrid transactional memory. In: 12th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), San Jose (2006, October)Google Scholar
  5. 5.
    Dice, D., Shalev, O., Shavit, N.: Transactional locking II. In: The Proceedings of the 20th International Symposium on Distributed Computing (DISC), Stockholm (2006, September)Google Scholar
  6. 6.
    von Eicken, T., Culler, D., Goldstein, S., Schauser, K.: Active messages: a mechanism for integrated communication and computation. In: Proceedings of the 19th International Symposium on Computer Architecture (ISCA) (1992, May)Google Scholar
  7. 7.
    Ennals, R.: Software Transactional Memory Should Not Be Obstruction-Free. Intel Research Cambridge Technical Report, IRCTR-06-052Google Scholar
  8. 8.
    Fang, Z., Zhang, L., Carter, J.B., Ibrahim, A., Parker, M.A.: Active memory operations. In: Proceedings of of the 21st International Conference on Supercomputing (ICS), Seattle (2007, June)Google Scholar
  9. 9.
    Fraser, K., Harris, T.: Concurrent programming without locks. ACM Trans. Comput. Syst. (ACM TOCS) 25(2) (2007, May)Google Scholar
  10. 10.
    Goodman, J.R., Vernon, M.K., Woest, P.J.: Efficient synchronization primitives for large-scale cache-coherent multiprocessors. In: Proceedings of the 3rd International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), Boston (1989)Google Scholar
  11. 11.
    Gottlieb A., Grishman R., Kruskal C., McAuliffe K., Rudolph L., Snir M.: The NYU multicomputer—designing a MIMD shared-memory parallel machine. IEEE Trans. Comput. C-32, 175–189 (1983)CrossRefGoogle Scholar
  12. 12.
    Hammond, L., Wong, V., Chen, M., Carlstrom, B.D., Davis, J.D., Hertzberg, B., Prabhu, M.K., Wijaya, H., Kozyrakis, C., Olukotun, K.: Transactional memory coherence and consistency. In: Proceedings of the 31st International Symposium on Computer Architecture (ISCA), Munich (2004, June)Google Scholar
  13. 13.
    Harris, T., Fraser, K.: Language support for lightweight transactions. In: The 18th Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), Anaheim (2003)Google Scholar
  14. 14.
    Harris, T., Plesko, M., Shinnar, A., Tarditi, D.: Optimizing memory transactions. In: The Proceedings of the Conference on Programming Language Design and Implementation (PLDI), Ottawa (2006, June)Google Scholar
  15. 15.
    He, B., Scherer III W.N., Scott, M.L.: Preemption adaptivity in time-published queue-based spin locks. In: 11th International Conference on High Performance Computing (HiPC) (2005)Google Scholar
  16. 16.
    Herlihy, M., Moss, J.E.B.: Transactional memory: architectural support for lock-free data structures. In: The 20th International Symposium on Computer Architecture (ISCA) (1993, May)Google Scholar
  17. 17.
    Kumar, S., Chu, M., Hughes, C.J., Kunduand, P., Nguyen, A.: Hybrid transactional memory. In: The 11th Symposium on Principles and Practice of Parallel Programming (PPoPP), New York (2006, March)Google Scholar
  18. 18.
    Larus, J., Rajwar, R.: Transactional Memory. Morgan Claypool Synthesis Series (2007)Google Scholar
  19. 19.
    Lev, Y., Moir, M., Nussbaum, D.: PhTM: Phased transactional memory. In: 2nd ACM SIGPLAN Workshop on Transactional Computing (TRANSACT) (2007)Google Scholar
  20. 20.
    Magnusson P.S., Christensson M., Eskilson J., Forsgren D., Hallberg G., Hogberg J., Larsson F., Moestedt A., Werner B.: Simics: a full system simulation platform. IEEE Comput. 35(2), 50–58 (2002)Google Scholar
  21. 21.
    Marathe, V.J., Spear, M.F., Acharya, A., Eisenstat, D., III, W.N.S., Scott, M.L.: Lowering the overhead of nonblocking software transactional memory. In: Proceedings of the 1st ACM SIGPLAN Workshop on Transactional Computing, Ottawa (2006, June)Google Scholar
  22. 22.
    Menon, V., et al.: Practical weak-atomicity semantics for java STM. In Proceedings of the 20th Symposium on Parallelism in Algorithms and Architectures(SPAA), Munich (2008)Google Scholar
  23. 23.
    Michael M.M.: Hazard pointers: safe memory reclamation for lockfree objects. IEEE Trans. Parallel Distrib. Syst. 15(6), 491–504 (2004)CrossRefGoogle Scholar
  24. 24.
    Martin, M.M.K., Sorin, D.J., Beckmann, B.M., Marty, M.R., Xu, M., Alameldeen, A.R., Moore, K.E., Hill, M.D., Wood, D.A.: Multifacet’s general execution-driven multiprocessor simulator (GEMS) toolset. In: Computer Architecture News (CAN) (2005, September)Google Scholar
  25. 25.
    Martinez, J.F., Torrellas, J.: Speculative synchronization: applying thread-level speculation to explicitly parallel applications. In: Proceedings of 10th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), San Jose (2002, October)Google Scholar
  26. 26.
    Mellor-Crummey, J.M., Scott, M.L.: Scalable reader-writer synchronization for shared-memory multiprocessors. In: Proceedings of the 3rd ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP), Williamsburg (1991)Google Scholar
  27. 27.
    Minh, C.C., Trautmann, M., Chung, J.W., McDonald, A., Bronson, N., Casper, J., Kozyrakis, C., Olukotun, K.: An effective hybrid transactional memory system with strong isolation guarantees. In: 34th International Symposium on Computer Architecture (ISCA), San Diego (2007, June)Google Scholar
  28. 28.
    Moore, K.E., Bobba, J., Moravan, M.J., Hill, M.D., Wood, D.A.: LogTM: Log-based transactional memory. In: Proceedings of the 12th International Conference on High-Performance Computer Architecture (HPCA), Austin (2006, February)Google Scholar
  29. 29.
    Rajwar, R., Herlihy, M., Lai, K.: Virtualizing transactional memory. In: The Proceedings of the 32nd International Symposium on Computer Architecture (ISCA), Madison (2005, June)Google Scholar
  30. 30.
    Rajwar, R., Goodman, J.R.: Speculative lock elision: enabling highly concurrent multithreaded execution. In: Proceedings of the 34th International Symposium on Microarchitecture (MICRO), Austin (2001)Google Scholar
  31. 31.
    Saha, B., Adl-Tabatabai, A.R., Jacobson, Q.: Architectural support for software transactional memory. In: The Proceedings of the 39th International Symposium on Microarchitecture (MICRO), Orlando (2006, December)Google Scholar
  32. 32.
    Scherer, W., Scott, M.: Advanced contention management for dynamic software transactional memory. In: Proceedings of 24th Annual ACM Symposium on Principles of Distributed Computing (PODC) (2005)Google Scholar
  33. 33.
    Shpeisman, T., Menon, V., Adl-Tabatabai, A., Balensiefer, S., Grossman, D., Hudson, R., Moore, K.F., Saha, B.: Enforcing isolation and ordering in STM. In: Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI) (2007)Google Scholar
  34. 34.
    Shriraman, A., Spear, M.F., Hossain, H., Marathe, V., Dwarkadas, S., Scott, M.L.: An integrated hardware–software approach to flexible transactional memory. In: Proceedings of the 34th International Symposium on Computer Architecture (ISCA) (2007, June)Google Scholar
  35. 35.
    Spear, M.F., Marathe, V.J., Dalessandro, L., Scott, M.L.: Privatization Techniques for Software Transactional Memory. UR CSD;TR915. Rochester University (2007, February)Google Scholar
  36. 36.
    Sun Microsystems. Sun Fire E25K/E20K Systems Overview. Technical Report 817-4136-12 (2005)Google Scholar
  37. 37.
    Tabba, F., Moir, M., Goodman, J.R., Hay, A., Wang, C.: NZTM: Nonblocking, zero-indirection transactional memory. In: Proceedings of 21st Annual Symposium on Parallelism in Algorithms and Architectures (SPAA) (2009, August)Google Scholar
  38. 38.
    Yen, L., Bobba, J., Marty, M.R., Moore, K.E., Volos, H., Hill, M.D., Swift, M.M., Wood, D.A.: LogTM-SE: Decoupling hardware transactional memory from caches. In: International Symposium on High Performance Computer Architecture (HPCA) (2007, February)Google Scholar

Copyright information

© Springer Science+Business Media, LLC 2010

Authors and Affiliations

  • Enrique Vallejo
    • 1
  • Sutirtha Sanyal
    • 2
  • Tim Harris
    • 3
  • Fernando Vallejo
    • 1
  • Ramón Beivide
    • 1
  • Osman Unsal
    • 2
  • Adrián Cristal
    • 2
  • Mateo Valero
    • 2
    • 4
  1. 1.University of CantabriaSantanderSpain
  2. 2.Barcelona Supercomputing CenterBarcelonaSpain
  3. 3.Microsoft ResearchCambridgeUK
  4. 4.Universitat Politècnica de CatalunyaBarcelonaSpain

Personalised recommendations