ISSN 1000-1239 CN 11-1777/TP

计算机研究与发展 ›› 2014, Vol. 51 ›› Issue (8): 1748-1763.doi: 10.7544/issn1000-1239.2014.20130123

Previous Articles     Next Articles

Dynamically Tolerating and Detecting Asymmetric Races

Wang Wenwen1,2, Wu Chenggang1, Paruj Ratanaworabhan3, Yuan Xiang1,2, Wang Zhenjiang1, Li Jianjun1, Feng Xiaobing1   

  1. 1(Key Laboratory of Computer System and Architecture (Institute of Computing Technology, Chinese Academy of Sciences), Beijing 100190);2(University of Chinese Academy of Sciences, Beijing 100049);3(Faculty of Engineering, Kasetsart University, Bangkok, Tailand 10900)
  • Online:2014-08-15

Abstract: Asymmetric races are a common type of data races. They are triggered when a thread accesses a shared variable in a critical section, and another thread accesses the same shared variable not in any critical section, or in a critical section guarded by a different lock. Asymmetric races in multi-threaded programs are usually harmful. To solve the problem introduced by asymmetric races, ARace is proposed. ARace utilizes shared variable protecting and write buffer to dynamically tolerate and detect asymmetric races. Shared variable protecting is used to protect shared variables that are read-only and read-before-write in critical sections, and these shared variables should not be modified out of critical sections; write buffer is used to buffer the writing operations to shared variables in critical sections. ARace can not only tolerate asymmetric races triggered by shared variable accesses in and out of critical sections, but also detect asymmetric races triggered by shared variable accesses in concurrent critical sections. ARace can be directly applied to binary code and requires neither additional compiler support nor hardware support. In addition, an implementation based on dynamic binary instrumentation is also proposed. The experimental results demonstrate that ARace guarantees the tolerance and detection of asymmetric races while incurring acceptable performance and memory overhead.

Key words: asymmetric race, tolerating and detecting, write buffer, page protecting, dynamic binary instrumentation

CLC Number: