Font Size: a A A

Research Of Concurrent Program Data Race Detection Method

Posted on:2021-12-24Degree:MasterType:Thesis
Country:ChinaCandidate:J T YangFull Text:PDF
GTID:2518306047998879Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
With the increase in the number of computer users,the scope of computer applications also expands.And more and more software systems have begun to consider concurrent programming.However,the concurrent programs are error-prone due to many uncertain factors in the design process.A data race is the most common problem in the concurrent programs,and its occurrence often causes the run-time error in the program or even crash directly.The emergence of a data race is quite hidden,it need not only certain input conditions but also specific threads scheduling.Therefore,data race problems are challenging to detect in concurrent programs.To eliminate data race,more and more researchers invest in the field of data race detection.The existing data race detection methods are divided into two types: static detection and dynamic detection.However,there are a large number of false reports in the static detection,and a large number of false negatives and a small number of false positives in dynamic detection.This thesis proposes a dynamic data race detection method to resolve the difficulty of data race detection and some problems of traditional algorithms.Based on this method,a data race detection tool Random Trace is implemented.We mainly completed the following work:This thesis analyzes the advantages and disadvantages of different algorithms for detecting data race dynamically,and a dynamic hybrid detection algorithm which based on Fast Track algorithm and lockset algorithm is proposed to detect possible data race in the program.Compared with the traditional hybrid dynamic detection algorithm,the proposed algorithm uses the happens-before relationship based on the thread segment to determine the sequence of access events,reduces the algorithm's sensitivity to thread scheduling.And aiming at the problem of reading and writing information being covered during the detection,a method of increasing thread scheduling and using message queues to store the read and write information is proposed to reduce the coverage and improve the rate of data race detection.Aiming at the potential data race that might be buried in the report of the mixed data race detection algorithm,a data race verification method based on the Race Fuzzer algorithm is proposed to monitor the behavior of possible data race in the program.By controlling the scheduling of threads,expose the real data race.Based on the proposed dynamic data race detection method,a data race detection tool Random Trace is designed and implemented on the binary instrumentation platform Pin.Finally,the tool is tested on test programs.And the test results show that the algorithm proposed in this thesis can effectively detect more data race with a high rate of true positive.
Keywords/Search Tags:Concurrent program, Data race detection, Happens-before, Thread scheduling
PDF Full Text Request
Related items