skip to main content
10.1145/2541940.2541960acmconferencesArticle/Chapter ViewAbstractPublication PagesasplosConference Proceedingsconference-collections
research-article

Transactionalizing legacy code: an experience report using GCC and Memcached

Published:24 February 2014Publication History

ABSTRACT

The addition of transactional memory (TM) support to existing languages provides the opportunity to create new soft- ware from scratch using transactions, and also to simplify or extend legacy code by replacing existing synchronization with language-level transactions. In this paper, we describe our experiences transactionalizing the memcached application through the use of the GCC implementation of the Draft C++ TM Specification. We present experiences and recommendations that we hope will guide the effort to integrate TM into languages, and that may also contribute to the growing collective knowledge about how programmers can begin to exploit TM in existing production-quality software.

References

  1. A.-R. Adl-Tabatabai, T. Shpeisman, and J. Gottschlich. Draft Specification of Transactional Language Constructs for C++, Feb. 2012. Version 1.1, http://justingottschlich.com/tm-specification-for-c-v-1-1/.Google ScholarGoogle Scholar
  2. M. Ansari, C. Kotselidis, K. Jarvis, M. Lujan, C. Kirkham, and I. Watson. Lee-TM: A Non-trivial Benchmark for Transactional Memory. In Proceedings of the International Conference on Algorithms and Architectures for Parallel Processing, June 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. P. Charles, C. Donawa, K. Ebcioglu, C. Grothoff, A. Kielstra, C. von Praun, V. Saraswat, and V. Sarkar. X10: An Object-Oriented Approach to Non-Uniform Cluster Computing. In Proceedings of the 20th ACM Conference on Object- Oriented Programming, Systems, Languages, and Applications, San Diego, CA, Oct. 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. L. Dalessandro, M. Spear, and M. L. Scott. NOrec: Streamlining STM by Abolishing Ownership Records. In Proceedings of the 15th ACM Symposium on Principles and Practice of Parallel Programming, Bangalore, India, Jan. 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. D. Dice, O. Shalev, and N. Shavit. Transactional Locking II. In Proceedings of the 20th International Symposium on Distributed Computing, Stockholm, Sweden, Sept. 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. A. Dragojevic, Y. Ni, and A.-R. Adl-Tabatabai. Optimizing Transactions for Captured Memory. In Proceedings of the 21st ACM Symposium on Parallelism in Algorithms and Architectures, Calgary, AB, Canada, Aug. 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. A. Dragojevic, M. Herlihy, Y. Lev, and M. Moir. On The Power of Hardware Transactional Memory to Simplify Memory Management. In Proceedings of the 30th ACM Symposium on Principles of Distributed Computing, San Jose, CA, June 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. P. Dudnik and M. M. Swift. Condition Variables and Transactional Memory: Problem or Opportunity? In Proceedings of the 4th ACM SIGPLAN Workshop on Transactional Computing, Raleigh, NC, Feb. 2009.Google ScholarGoogle Scholar
  9. P. Felber, C. Fetzer, and T. Riegel. Dynamic Performance Tuning of Word-Based Software Transactional Memory. In Proceedings of the 13th ACM Symposium on Principles and Practice of Parallel Programming, Salt Lake City, UT, Feb. 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. F. E. Fich, V. Luchangco, M. Moir, and N. Shavit. Obstruction-free Algorithms Can Be Practically Wait-free. In Proceedings of the 19th International Symposium on Distributed Computing, Cracow, Poland, Sept. 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. R. Guerraoui and M. Kapalka. On the Correctness of Transactional Memory. In Proceedings of the 13th ACM Symposium on Principles and Practice of Parallel Programming, Salt Lake City, UT, Feb. 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. T. Harris, S. Marlow, S. Peyton Jones, and M. Herlihy. Composable Memory Transactions. In Proceedings of the 10th ACM Symposium on Principles and Practice of Parallel Programming, Chicago, IL, June 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. M. P. Herlihy and J. E. B. Moss. Transactional Memory: Architectural Support for Lock-Free Data Structures. In Proceedings of the 20th International Symposium on Computer Architecture, San Diego, CA, May 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. M. P. Herlihy, V. Luchangco, M. Moir, and W. N. Scherer III. Software Transactional Memory for Dynamic-sized Data Structures. In Proceedings of the 22nd ACM Symposium on Principles of Distributed Computing, Boston, MA, July 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. S. Hong, T. Oguntebi, J. Casper, N. Bronson, C. Kozyrakis, and K. Olukotun. Eigenbench: A Simple Exploration Tool for Orthogonal TM Characteristics. In Proceedings of the IEEE International Symposium on Workload Characterization, Atlanta, GA, Dec. 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. G. Kestor, S. Stipic, O. Unsal, A. Cristal, and M. Valero. RMS-TM: A Transactional Memory Benchmark for Recognition, Mining and Synthesis Applications. In Proceedings of the 4th ACM SIGPLAN Workshop on Transactional Computing, Raleigh, NC, Feb. 2009.Google ScholarGoogle Scholar
  17. Y. Lev, V. Luchangco, and M. Olszewsk. Scalable Reader-Writer Locks. In Proceedings of the 21st ACM Symposium on Parallelism in Algorithms and Architectures, Calgary, AB, Canada, Aug. 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Y. Liu and M. Spear. Toxic Transactions. In Proceedings of the 6th ACM SIGPLAN Workshop on Transactional Computing, San Jose, CA, June 2011.Google ScholarGoogle Scholar
  19. V. Luchangco and V. Marathe. Transaction Communicators: Enabling Cooperation Among Concurrent Transactions. In Proceedings of the 16th ACM Symposium on Principles and Practice of Parallel Programming, San Antonio, TX, Feb. 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. D. Lupei, B. Simion, D. Pinto, M. Misler, M. Burcea, W. Krick, and C. Amza. Transactional Memory Support for Scalable and Transparent Parallelization of Multiplayer Games. In Proceedings of the EuroSys2010 Conference, Paris, France, Apr. 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. N. Mathewson and N. Provos. Libevent -- An Event Notification Library, 2011--2013. http://libevent.org/.Google ScholarGoogle Scholar
  22. V. Menon, S. Balensiefer, T. Shpeisman, A.-R. Adl-Tabatabai, R. Hudson, B. Saha, and A. Welc. Practical Weak-Atomicity Semantics for Java STM. In Proceedings of the 20th ACM Symposium on Parallelism in Algorithms and Architectures, Munich, Germany, June 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. C. C. Minh, J. Chung, C. Kozyrakis, and K. Olukotun. STAMP: Stanford Transactional Applications for Multiprocessing. In Proceedings of the IEEE International Symposium on Workload Characterization, Seattle, WA, Sept. 2008.Google ScholarGoogle Scholar
  24. V. Pankratius and A.-R. Adl-Tabatabai. A Study of Transactional Memory vs. Locks in Practice. In Proceedings of the 23rd ACM Symposium on Parallelism in Algorithms and Architectures, San Jose, CA, June 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. L. Poettering. Measuring Lock Contention, 2009--2013. http://0pointer.de/blog/projects/mutrace.html.Google ScholarGoogle Scholar
  26. M. Pohlack and S. Diestelhorst. From Lightweight Hardware Transactional Memory to Lightweight Lock Elision. In Proceedings of the 6th ACM SIGPLAN Workshop on Transactional Computing, San Jose, CA, June 2011.Google ScholarGoogle Scholar
  27. T. Riegel, C. Fetzer, and P. Felber. Automatic Data Partitioning in Software Transactional Memories. In Proceedings of the 20th ACM Symposium on Parallelism in Algorithms and Architectures, Munich, Germany, June 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. C. Rossbach, O. Hofmann, and E. Witchel. Is Transactional Programming Really Easier? In Proceedings of the 15th ACM Symposium on Principles and Practice of Parallel Programming, Bangalore, India, Jan. 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. B. Saha, A.-R. Adl-Tabatabai, R. L. Hudson, C. C. Minh, and B. Hertzberg. McRT-STM: A High Performance Software Transactional Memory System For A Multi-Core Runtime. In Proceedings of the 11th ACM Symposium on Principles and Practice of Parallel Programming, New York, NY, Mar. 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. W. N. Scherer III and M. L. Scott. Advanced Contention Management for Dynamic Software Transactional Memory. In Proceedings of the 24th ACM Symposium on Principles of Distributed Computing, Las Vegas, NV, July 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. N. Shavit and D. Touitou. Software Transactional Memory. In Proceedings of the 14th ACM Symposium on Principles of Distributed Computing, Ottawa, ON, Canada, Aug. 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Y. Smaragdakis, A. Kay, R. Behrends, and M. Young. Transactions with Isolation and Cooperation. In Proceedings of the 22nd ACM Conference on Object Oriented Programming, Systems, Languages, and Applications, Montreal, Quebec, Canada, Oct. 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. M. Spear, V. Marathe, L. Dalessandro, and M. Scott. Privatization Techniques for Software Transactional Memory (POSTER). In Proceedings of the 26th ACM Symposium on Principles of Distributed Computing, Portland, OR, Aug. 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. M. Spear, M. M. Michael, and M. L. Scott. Inevitability Mechanisms for Software Transactional Memory. In Proceedings of the 3rd ACM SIGPLAN Workshop on Transactional Computing, Salt Lake City, UT, Feb. 2008.Google ScholarGoogle Scholar
  35. M. Spear, M. Silverman, L. Dalessandro, M. M. Michael, and M. L. Scott. Implementing and Exploiting Inevitability in Software Transactional Memory. In Proceedings of the 37th International Conference on Parallel Processing, Portland, OR, Sept. 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. A. Welc, B. Saha, and A.-R. Adl-Tabatabai. Irrevocable Transactions and their Applications. In Proceedings of the 20th ACM Symposium on Parallelism in Algorithms and Architectures, Munich, Germany, June 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. F. Zyulkyarov, V. Gajinov, O. Unsal, A. Cristal, E. Ayguade, T. Harris, and M. Valero. Atomic Quake: Using Transactional Memory in an Interactive Multiplayer Game Server. In Proceedings of the 14th ACM Symposium on Principles and Practice of Parallel Programming, Raleigh, NC, Feb. 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Transactionalizing legacy code: an experience report using GCC and Memcached

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in
      • Published in

        cover image ACM Conferences
        ASPLOS '14: Proceedings of the 19th international conference on Architectural support for programming languages and operating systems
        February 2014
        780 pages
        ISBN:9781450323055
        DOI:10.1145/2541940

        Copyright © 2014 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 24 February 2014

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

        Acceptance Rates

        ASPLOS '14 Paper Acceptance Rate49of217submissions,23%Overall Acceptance Rate535of2,713submissions,20%

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader