Font Size: a A A

Research On Data Race Static Detection Of Multi-thread Program

Posted on:2014-02-21Degree:MasterType:Thesis
Country:ChinaCandidate:D H JianFull Text:PDF
GTID:2248330395999162Subject:Software engineering
Abstract/Summary:PDF Full Text Request
With the popularity of multi-core CPUs and multi-thread applications, multi-thread technology is becoming more and more widely used. However, multi-thread programs are very complex, along with characteristic of random results and difficult to reproduce. That’s why it is difficult to develop multi-thread programs, which increase the probability of mistakes that are not existed in sequential programming. In addition, because of the uncertainty of thread scheduling, there will be different behaviors among multi-thread programs transferred from one to other. Those mentioned above will lead to data competition failure, which is hard to find and locate through running programs several times. Therefore, the multi-thread program data competition failure detection technology holds a high value for research.In this paper, we present a static detection analysis method and tools system for the data race faults in a multi-threaded program. Based on studying the present situation and results of data race detection at home and abroad, this paper presents a method which uses the abstract syntax tree to identify multi-thread source program and uses XML intermediate model to formalize the attribute information of the program. The XML description can reduce the complexity of the program attribute information, and has a strong scalability. Finally, this paper presents a static data race analysis method based on happened-before relation and lock sets and builds a XML module of the shared resource access information of multi-thread program. In order to achieve multi-thread data race static analysis, a certain algorithm is used to extract possible data race sequence from the XML module.At last, we designed and implemented a system for data race static detection of multi-thread program according to the architecture. The implementation is based on data race detection methods of lock mechanism, and reading and writing access to shared variables. The system supports extracting key attributes of source codes by lexical and grammatical analysis. To be exact, the system formalizes the description of accessing the race resources using XML, detects the potential data race in a program constructing access-trees for shared resources, and positions the detected race to the program in a reverse direction.
Keywords/Search Tags:Data Race, Static Analysis, XML Module
PDF Full Text Request
Related items