TM-dietlibc: A TM-aware Real-World System Library
Authors:
- Vesna SmiljkovicVSVesna Smiljkovic
- Martin NowackMNMartin Nowack
- Neboja MileticNMNeboja Miletic
- Timothy HarrisTHTimothy Harris
- Osman UnsalOUOsman Unsal
- Adrian CristalACAdrian Cristal
- Mateo ValeroMVMateo Valero
- 1 May 2013
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- No. 15302075,p. 1266-1274
Abstract
The simplicity of concurrent programming with Transactional Memory (TM) and its recent implementation in mainstream processors greatly motivates researchers and industry to investigate this field and propose new implementations and optimizations. However, there is still no standard C system library which a wide range of TM developers can adopt. TM application developers have been forced to avoid library calls inside of transactions or to execute them irrevocably (i.e. in serial order). In this paper, we present the first TM-aware system library, a complex software implementation integrated with TM principles and suited for software (STM), hardware (HTM) and hybrid TM (HyTM). The library we propose is derived from a modified lock-based implementation and can be used with the existing standard C API. In our work, we describe design challenges and code optimizations that would be specific to any TMbased system library or application. We argue about system call execution within transactions, highlighting the possibility of unexpected results from threads. For this reason we propose: (1) a mechanism for detecting conflicts over kernel data in user space, and (2) a new barrier to allow hybrid TM to be used effectively with system libraries. Our evaluation includes different TM implementations and the focus is on memory management and file operations since they are widely used in applications and require additional mechanisms for concurrent execution. We show the benefit we gain with our libc modifications providing parallel execution as much as possible. The library we propose shows high scalability when linked with STM and HTM. For file operations it shows on average a 1.1, 2.6 and 3.7x performance speedup for 8 cores using HyTM, STM and HTM, respectively (over a lock-based single-threaded execution). For a red-black tree it shows on average 3.14x performance speedup for 8 cores using STM (over a multi-read single-threaded execution).Keywords
This publication has 20 references indexed in Scilit:
- Integrating file operations into transactional memoryJournal of Parallel and Distributed Computing, 2011
- A study of transactional memory vs. locks in practice2011
- Optimizing hybrid transactional memory2011
- Operating System Transactions2009
- Adaptive Locks: Combining Transactions and Locks for Efficient Concurrency2009
- xCalls2009
- Irrevocable transactions and their applications2008
- Semantics of transactional memory and automatic mutual exclusion2008
- A Model of Dynamic Separation for Transactional MemoryLecture Notes in Computer Science, 2008
- Developing libraries using software transactional memoryComputer Science and Information Systems, 2008