RaceWeir: Hardware-Assisted Data Race Detection in Multi-core System

碩士 === 國立成功大學 === 電腦與通信工程研究所 === 102 === As the multicore platform becomes more and more widespread, programmers usually adopt multithreaded programing to improve the performance. However, multithreaded applications are prone to cause synchronization bugs, such as data races. Unfortunately, existing...

Full description

Bibliographic Details
Main Authors: Ying-WeiWang, 王應瑋
Other Authors: Chung-Ho Chen
Format: Others
Language:en_US
Published: 2014
Online Access:http://ndltd.ncl.edu.tw/handle/08214581690445543603
Description
Summary:碩士 === 國立成功大學 === 電腦與通信工程研究所 === 102 === As the multicore platform becomes more and more widespread, programmers usually adopt multithreaded programing to improve the performance. However, multithreaded applications are prone to cause synchronization bugs, such as data races. Unfortunately, existing software race detectors are slow in performance while the published hardware-assisted race detectors are imprecise in reporting data race events. In this thesis, we propose two hardware-based data race detection mechanisms to catch synchronization bugs in a multicore system. We first develop a hardware implementation of a hybrid-based data race detection mechanism based on the lockset and happens-before algorithms. We find that the way this hybrid detection mechanism handles the barriers adversely affects the detection capability of the happens-before. We remove most of the storage and mechanism in lockset and only keep the lock state and access ID for each variable. Based on this, we propose the improved happens-before detection mechanism which is proved to be a precise data race detector and has less cache area requirement. To be precise in data race detection, we also develop the backup and restore technique to eliminate the cache eviction problem for the cached metadata. We evaluate the two proposed detection mechanisms by ten SPLASH2 benchmarks. Through the simulations, we have found the existing races in SPLASH2 benchmarks and our method has significantly enhanced the detection capability due to the employment of the backup and restore technique. The improved happens-before detection mechanisms has caused about 1.22x-2.55x of overheads compared to the normal execution time.