Nothing Special   »   [go: up one dir, main page]

skip to main content
research-article

Transactionalizing legacy code: an experience report using GCC and Memcached

Published: 24 February 2014 Publication 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/.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[18]
Y. Liu and M. Spear. Toxic Transactions. In Proceedings of the 6th ACM SIGPLAN Workshop on Transactional Computing, San Jose, CA, June 2011.
[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.
[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.
[21]
N. Mathewson and N. Provos. Libevent -- An Event Notification Library, 2011--2013. http://libevent.org/.
[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.
[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.
[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.
[25]
L. Poettering. Measuring Lock Contention, 2009--2013. http://0pointer.de/blog/projects/mutrace.html.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.

Cited By

View all
  • (2016)EXCITE-VMProceedings of the 2016 International Conference on Parallel Architectures and Compilation10.1145/2967938.2967955(401-412)Online publication date: 11-Sep-2016
  • (2024)When Is Parallelism Fearless and Zero-Cost with Rust?Proceedings of the 36th ACM Symposium on Parallelism in Algorithms and Architectures10.1145/3626183.3659966(27-40)Online publication date: 17-Jun-2024
  • (2023)Separating Mechanism from Policy in STM2023 32nd International Conference on Parallel Architectures and Compilation Techniques (PACT)10.1109/PACT58117.2023.00031(279-296)Online publication date: 21-Oct-2023
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM SIGPLAN Notices
ACM SIGPLAN Notices  Volume 49, Issue 4
ASPLOS '14
April 2014
729 pages
ISSN:0362-1340
EISSN:1558-1160
DOI:10.1145/2644865
Issue’s Table of Contents
  • 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
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
Published in SIGPLAN Volume 49, Issue 4

Check for updates

Author Tags

  1. c++
  2. gcc
  3. memcached
  4. transactional memory

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)6
  • Downloads (Last 6 weeks)0
Reflects downloads up to 14 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2016)EXCITE-VMProceedings of the 2016 International Conference on Parallel Architectures and Compilation10.1145/2967938.2967955(401-412)Online publication date: 11-Sep-2016
  • (2024)When Is Parallelism Fearless and Zero-Cost with Rust?Proceedings of the 36th ACM Symposium on Parallelism in Algorithms and Architectures10.1145/3626183.3659966(27-40)Online publication date: 17-Jun-2024
  • (2023)Separating Mechanism from Policy in STM2023 32nd International Conference on Parallel Architectures and Compilation Techniques (PACT)10.1109/PACT58117.2023.00031(279-296)Online publication date: 21-Oct-2023
  • (2020)Understanding and Improving Persistent Transactions on Optane™ DC Memory2020 IEEE International Parallel and Distributed Processing Symposium (IPDPS)10.1109/IPDPS47924.2020.00044(348-357)Online publication date: May-2020
  • (2019)FPGA-Accelerated Optimistic Concurrency Control for Transactional MemoryProceedings of the 52nd Annual IEEE/ACM International Symposium on Microarchitecture10.1145/3352460.3358270(911-923)Online publication date: 12-Oct-2019
  • (2019)Simplifying Transactional Memory Support in C++ACM Transactions on Architecture and Code Optimization10.1145/332879616:3(1-24)Online publication date: 25-Jul-2019
  • (2019)Optimizing Persistent Memory TransactionsProceedings of the International Conference on Parallel Architectures and Compilation Techniques10.1109/PACT.2019.00025(219-231)Online publication date: 23-Sep-2019
  • (2019)Convoider: A Concurrency Bug Avoider Based on Transparent Software Transactional MemoryInternational Journal of Parallel Programming10.1007/s10766-019-00642-1Online publication date: 12-Sep-2019
  • (2018)On the Efficiency of Transactional Code Generation: A GCC Case Study2018 Symposium on High Performance Computing Systems (WSCAD)10.1109/WSCAD.2018.00037(184-190)Online publication date: Oct-2018
  • (2017)What Scalable Programs Need from Transactional MemoryACM SIGARCH Computer Architecture News10.1145/3093337.303775045:1(105-118)Online publication date: 4-Apr-2017
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media