skip to main content
10.1145/1294261.1294271acmconferencesArticle/Chapter ViewAbstractPublication PagessospConference Proceedingsconference-collections
Article

TxLinux: using and managing hardware transactional memory in an operating system

Published: 14 October 2007 Publication History

Abstract

TxLinux is a variant of Linux that is the first operating system to use hardware transactional memory (HTM) as a synchronization primitive, and the first to manage HTM in the scheduler. This paper describes and measures TxLinux and discusses two innovations in detail: cooperation between locks and transactions, and theintegration of transactions with the OS scheduler. Mixing locks and transactions requires a new primitive, cooperative transactional spinlocks (cxspinlocks) that allow locks and transactions to protect the same data while maintaining the advantages of both synchronization primitives. Cxspinlocks allow the system to attemptexecution of critical regions with transactions and automatically roll back to use locking if the region performs I/O. Integrating the scheduler with HTM eliminates priority inversion. On a series ofreal-world benchmarks TxLinux has similar performance to Linux, exposing concurrency with as many as 32 concurrent threads on 32 CPUs in the same critical region.

Supplementary Material

JPG File (1294271.jpg)
index.html (index.html)
Slides from the presentation
ZIP File (p87-slides.zip)
Supplemental material for TxLinux: using and managing hardware transactional memory in an operating system
Audio only (1294271.mp3)
Video (1294271.mp4)

References

[1]
BES. Akgul, VJM. III, HThane, and PKuacharoen. Hardware support for priority inheritance. rtss, 00:246, 2003.
[2]
A. Alameldeen and D. Wood. Variability in architectural simulations of multi-threaded workloads. In HPCA, 2003.
[3]
C. Anaian, K. Asanovic, B. Kuszmaul, C. Leiserson, and S. Lie. Unbounded transactional memory. In HPCA, 2005.
[4]
C. Blundell, J. Devietti, E. C. Lewis, and M. M. K. Martin. Making the fast case common and the uncommon case simple in unbounded transactional memory. In ISCA, 2007.
[5]
C. Blundell, E. C. Lewis, and M. M. K. Martin. Deconstructing transactions: The subtleties of atomicity. In Fourth Annual Workshop on Duplicating, Deconstructing, and Debunking. Jun 2005.
[6]
D. Bovet and M. Cesati. Understanding the Linux Kernel. O'Reilly Media, Inc., 3rd edition, 2005.
[7]
B. Carlstrom, A. McDonald, H. Chafi, J. Chung, C. Cao Minh, C. Kozyrakis, and K. Olukotun. The Atomos transactional programming language. In PLDI, Jun 2006.
[8]
A. Chou, J. Yang, B. Chelf, S. Hallem, and D. Engler. An emprical study of operating systems errors. In SOSP, 2001.
[9]
W. Chuang, S. Narayanasamy, G. Venkatesh, J. Sampson, M. V. Biesbrouck, G. Pokam, B. Calder, and O. Colavin. Unbounded page-based transactional memory. In ASPLOS--XII, 2006.
[10]
J. Chung, C. Cao Minh, A. McDonald, H. Chafi, B. D. Carlstrom, T. Skare, C. Kozyrakis, and K. Olukotun. Tradeoffs in transactional memory virtualization. In ASPLOS. ACM Press, Oct 2006.
[11]
P. Damron, A. Fedorova, Y. Lev, V. Luchangco, M. Moir, and D. Nussbaum. Hybrid transactional memory. In ASPLOS, 2006.
[12]
E. Elnozahy, D. Johnson, and Y. Wang. A survey of rollback-recovery protocols in message-passing systems, 1996.
[13]
D. Enger and K. Ashcraft. Racer-X: Effective, static detection of race conditions and deadlocks. In SOSP, 2003.
[14]
A.-R. A.-T. et~al. Compiler and runtime support for efficient software transactional memory. In PLDI, Jun 2006.
[15]
J. Gray and A. Reuter. Transaction Processing: Concepts and Techniques. Morgan Kaufmann, 2nd edition, 1993.
[16]
M. Greenwald and D. Cheriton. The synergy between nonblocking synchronization and operating system structure. In OSDI, 1996.
[17]
L. Hammond, V. Wong, M. Chen, B. Carlstrom, J. Davis, B. Hertzberg, M. Prabhu, H. Wijaya, C. Kozyrakis, and K. Olukotun. Transactional memory coherence and consistency. In ISCA, June 2004.
[18]
L. Hammond, V. Wong, M. Chen, B. D. Carlstrom, J. D. Davis, B. Hertzberg, M. K. Prabhu, HWijaya, CKozyrakis, and KOlukotun. Transactional memory coherence and consistency. In ISCA, Jun 2004.
[19]
T. Harris. Exceptions and side-effects in atomic blocks. Sci. Comput. Program., 58(3):325--343, 2005.
[20]
T. Harris, M. Herlihy, S. Marlow, and S. Peyton-Jones. Composable memory transactions. In PPoPP, Jun 2005.
[21]
M. Herlihy. Wait-free synchronization. In TOPLAS, 1991.
[22]
M. Herlihy and J. E. Moss. Transactional memory: Architectural support for lock-free data structures. In ISCA, May 1993.
[23]
O. S. Hofmann, D. E. Porter, C. J. Rossbach, H. E. Ramadan, and E. Witchel. Solving difficult HTM problems without difficult hardware. In ACM TRANSACT Workshop, 2007.
[24]
Intel Corporation. IA-32 Intel Architecture Software Developer's Manuals, 2006. http://developer.intel.com/design/processor/.
[25]
S. Kumar, M. Chu, C. J. Hughes, P. Kundu, and A. Nguyen. Hybrid transactional memory. In PPoPP, 2006.
[26]
H. Kung and J. T. Robinson. On optimistic methods of concurrency control. In ACM Transactions on Database Systems 6(2), June 1981.
[27]
L. Lamport. Concurrent reading and writing. In Communications of the ACM, November 1977.
[28]
B. W. Lampson. A scheduling philosophy for multiprocessing systems. Communications of the ACM, 11(5), 1968.
[29]
J. R. Larus and R. Rajwar. Transactional Memory. Morgan & Claypool, 2006.
[30]
P. Magnusson, M. Christianson, and J. E. et al. Simics: A full system simulation platform. In IEEE Computer vol.35 no.2, Feb 2002.
[31]
H. Massalin and C. Pu. A lock-free multiprocessor OS kernel. In Operating System Review 26(2), 1992.
[32]
A. McDonald, J. Chung, B. Carlstrom, C. C.M., H. Chafi, C. Kozyrakis, and K. Olukotun. Architectural semantics for practical transactional memory. In ISCA, Jun 2006.
[33]
R. McDougall and J. Mauro. Solaris Internals. Prentice Hall, 2nd edition, 2006.
[34]
Microsoft Corporation. Transactional NTFS (TxF), 2006. http://msdn2.microsoft.com/en-us/library/aa365456.aspx.
[35]
K. E. Moore, JBobba, M. J. Moravan, MD. Hill, and D. A. Wood. Logtm: Log-based transactional memory. In HPCA, 2006.
[36]
M. J. Moravan, J. Bobba, K. E. Moore, L. Yen, M. D. Hill, B. Liblit, M. M. Swift, and D. A. Wood. Supporting nested transactional memory in logtm. In ASPLOS-XII. 2006.
[37]
E. Moss and T. Hosking. Nested transactional memory: Model and preliminary architecture sketches. In SCOOL, 2005.
[38]
J. E. B. Moss, N. D. Griffeth, and M. H. Graham. Abstraction in recovery management. SIGMOD Rec., 15(2):72--83, 1986.
[39]
J. E. B. Moss and A. L. Hosking. Nested transactional memory: Model and architecture sketches. In In Science of Computer Programming, volume~63. Dec 2006.
[40]
J. K. Ousterhout. Why aren't operating systems getting faster as fast as hardware? In USENIX Summer, 1990.
[41]
C. Pramode. Experiments with kernel 2.6 on a hyperthreaded Pentium 4 LG. Linux Gazette, 2007.
[42]
R. Rajwar and J. Goodman. Speculative lock elision: Enabling highly concurrent multithreaded execution. In MICRO, 2001.
[43]
R. Rajwar and J. Goodman. Transactional lock-free execution of lock-based programs. In ASPLOS, 2002.
[44]
R. Rajwar, M. Herlihy, and K. Lai. Virtualizing transactional memory. In ISCA. Jun 2005.
[45]
H. Ramadan, C. Rossbach, D. Porter, O. Hofmann, A. Bhandari, and E. Witchel. Evaluating transactional memory tradeoffs with TxLinux. In ISCA, 2007.
[46]
H. Ramadan, C. Rossbach, and E. Witchel. The Linux kernel: A challenging workload for transactional memory. In Workshop on Transactional Memory Workloads, June 2006.
[47]
S. Rostedt and D. V. Hart. Internals of the RT patch. In Linux Symposium, 2007.
[48]
M. Russinovich and D. Solomon. Microsoft Windows Internals: Microsoft Windows Server(TM) 2003, Windows XP, and Windows 2000. Microsoft Press, 4th edition, 2004.
[49]
B. Saha, A.-R. Adl-Tabatabai, and Q. Jacobson. Architectural support for software transactional memory. In MICRO, pages 185--196, 2006.
[50]
W. N. Scherer III and M. L. Scott. Advanced contention management for dynamic software transactional memory. In PODC, 2005.
[51]
H. Sutter and J. Larus. Software and the concurrency revolution. Queue, 3(7):54--62, 2005.
[52]
A. Tucker and A. Gupta. Process control and scheduling issues for multiprogrammed shared-memory multiprocessors. In SOSP, 1989.
[53]
S. Tweedie. Journaling the Linux ext2fs filesystem. In LinuxExpo '98, 1998.
[54]
A. Welc, A. L. Hosking, and S. Jagannathan.Transparently reconciling transactions with locking for java synchronization. In ECOOP, Jul 2006.
[55]
L. Yen, J. Bobba, M. Marty, K. E. Moore, H. Volos, M. D. Hill, M. M. Swift, and DA. Wood. Logtm-SE: Decoupling hardware transactional memory from caches. In HPCA. Feb 2007.
[56]
C. Zilles and L. Baugh. Extending hardware transactional memory to support non-busy waiting and non-transactional actions. In ACM TRANSACT Workshop, Jun 2006.

Cited By

View all
  • (2021)Migration in Hardware Transactional Memory on Asymmetric MultiprocessorIEEE Access10.1109/ACCESS.2021.30775399(69346-69364)Online publication date: 2021
  • (2020)An HTM-based update-side synchronization for RCU on NUMA systemsProceedings of the Fifteenth European Conference on Computer Systems10.1145/3342195.3387527(1-15)Online publication date: 15-Apr-2020
  • (2020)Investigating Transactional Memory for High Performance Embedded SystemsArchitecture of Computing Systems – ARCS 202010.1007/978-3-030-52794-5_8(97-108)Online publication date: 9-Jul-2020
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
SOSP '07: Proceedings of twenty-first ACM SIGOPS symposium on Operating systems principles
October 2007
378 pages
ISBN:9781595935915
DOI:10.1145/1294261
  • cover image ACM SIGOPS Operating Systems Review
    ACM SIGOPS Operating Systems Review  Volume 41, Issue 6
    SOSP '07
    December 2007
    363 pages
    ISSN:0163-5980
    DOI:10.1145/1323293
    Issue’s Table of Contents
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]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 14 October 2007

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. MetaTM
  2. TxLinux
  3. operating systems
  4. optimistic concurrency
  5. synchronization
  6. transactional memory

Qualifiers

  • Article

Conference

SOSP07
Sponsor:
SOSP07: ACM SIGOPS 21st Symposium on Operating Systems Principles 2007
October 14 - 17, 2007
Washington, Stevenson, USA

Acceptance Rates

Overall Acceptance Rate 174 of 961 submissions, 18%

Upcoming Conference

SOSP '25
ACM SIGOPS 31st Symposium on Operating Systems Principles
October 13 - 16, 2025
Seoul , Republic of Korea

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)13
  • Downloads (Last 6 weeks)1
Reflects downloads up to 17 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2021)Migration in Hardware Transactional Memory on Asymmetric MultiprocessorIEEE Access10.1109/ACCESS.2021.30775399(69346-69364)Online publication date: 2021
  • (2020)An HTM-based update-side synchronization for RCU on NUMA systemsProceedings of the Fifteenth European Conference on Computer Systems10.1145/3342195.3387527(1-15)Online publication date: 15-Apr-2020
  • (2020)Investigating Transactional Memory for High Performance Embedded SystemsArchitecture of Computing Systems – ARCS 202010.1007/978-3-030-52794-5_8(97-108)Online publication date: 9-Jul-2020
  • (2019)Applying Transactional Memory for Concurrency-Bug Failure Recovery in Production RunsIEEE Transactions on Parallel and Distributed Systems10.1109/TPDS.2018.287765630:5(990-1006)Online publication date: 1-May-2019
  • (2018)Harmonizing speculative and non-speculative execution in architectures for ordered parallelismProceedings of the 51st Annual IEEE/ACM International Symposium on Microarchitecture10.1109/MICRO.2018.00026(217-230)Online publication date: 20-Oct-2018
  • (2018)High-Performance GPU Transactional Memory via Eager Conflict Detection2018 IEEE International Symposium on High Performance Computer Architecture (HPCA)10.1109/HPCA.2018.00029(235-246)Online publication date: Feb-2018
  • (2017)SeerACM Transactions on Computer Systems10.1145/313203635:3(1-41)Online publication date: 14-Nov-2017
  • (2016)Proactive Control of Approximate ProgramsACM SIGARCH Computer Architecture News10.1145/2980024.287240244:2(607-621)Online publication date: 25-Mar-2016
  • (2016)CSRACM SIGARCH Computer Architecture News10.1145/2980024.287236944:2(773-787)Online publication date: 25-Mar-2016
  • (2016)CSRACM SIGOPS Operating Systems Review10.1145/2954680.287236950:2(773-787)Online publication date: 25-Mar-2016
  • 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

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media