scholarly journals Concurrency Bug Avoiding Based on Optimized Software Transactional Memory

2019 ◽  
Vol 2019 ◽  
pp. 1-19
Author(s):  
Z. Yu ◽  
Y. Zuo ◽  
W. C. Xiong

Software transactional memory is an effective mechanism to avoid concurrency bugs in multithreaded programs. However, two problems hinder the adoption of such traditional systems in the wild world: high human cost for equipping programs with transaction functionality and low compatibility with I/O calls and conditional variables. This paper presents Convoider to solve these problems. By intercepting interthread operations and designating code among them as transactions in each thread, Convoider automatically transactionalizes target programs without any source code modification and recompiling. By saving/restoring stack frames and CPU registers on beginning/aborting a transaction, Convoider makes execution flow revocable. By turning threads into processes, leveraging virtual memory protection and customizing memory allocation/deallocation, Convoider makes memory manipulations revocable. By maintaining virtual file systems and redirecting I/O operations onto them, Convoider makes I/O effects revocable. By converting lock/unlock operations to no-ops, customizing signal/wait operations on condition variables, and committing memory changes transactionally, Convoider makes deadlocks, data races, and atomicity violations impossible. Experimental results show that Convoider succeeds in transparently transactionalizing twelve real-world applications with averagely incurring only 28% runtime overhead and perfectly avoid 94% of thirty-one concurrency bugs used in our experiments. This study can help efficiently transactionalize legacy multithreaded applications and effectively improve the runtime reliability of them.

2015 ◽  
Vol 2015 ◽  
pp. 1-14 ◽  
Author(s):  
Ok-Kyoon Ha ◽  
Yong-Kee Jun

Data races represent the most notorious class of concurrency bugs in multithreaded programs. To detect data races precisely and efficiently during the execution of multithreaded programs, the epoch-based FastTracktechnique has been employed. However, FastTrackhas time and space complexities that depend on the maximum parallelism of the program to partially maintain expensive data structures, such as vector clocks. This paper presents an efficient algorithm, callediFT, that uses only the epochs of the access histories. Unlike FastTrack, our algorithm requiresO(1)operations to maintain an access history and locate data races, without any switching between epochs and vector clocks. We implement this algorithm on top of the Pin binary instrumentation framework and compare it with other on-the-fly detection algorithms, including FastTrack, which uses a state-of-the-art happens-before analysis algorithm. Empirical results using the PARSEC benchmark show thatiFT reduces the average runtime and memory overhead to 84% and 37%, respectively, of those of FastTrack.


2018 ◽  
Vol 51 (12) ◽  
pp. 105-113
Author(s):  
Matthew Le ◽  
Ryan Yates ◽  
Matthew Fluet

Sign in / Sign up

Export Citation Format

Share Document