Font Size: a A A

Research On Methods Of Data Race Detection And Verification On Multithreaded Program

Posted on:2017-04-12Degree:MasterType:Thesis
Country:ChinaCandidate:Z YangFull Text:PDF
GTID:2308330503987219Subject:Software engineering
Abstract/Summary:PDF Full Text Request
Currently, with the development of the computer multi-core hardware, multithreaded programs are becoming more and more prevalent and being adopted widely. Due to the uncertainty of the accesses to the shared memory locations and the randomness of the schedules among the threads, it is difficult and challenging to analyze multithreaded programs. The software developers and maintainers need to spend massive time detect and locate these software quality problems.Data races are one of the main causes of the concurrency bugs. They are always leading to incorrect executions or seriously causing program crashes. A data race occurs in a multithreaded program when at least two different threads access the same shared memory location without an ordering constraint between the accesses, where at least one of the accesses is a write. Data race conditions are often subtle and are difficult to trigger, not only require specific inputs, but also require specific thread interleavings. Therefore, how to effectively and efficiently detect and verify data races is an urgent problem to be solved to ensure the software reliability and security.In this paper, we proposed the approach to detect and verify the data races. Our contributions are as follows:1. We use the exiting static data race detectors to find all the suspicious data races. Meanwhile, we use static analysis techniques to find all the potential ad-hoc synchronizations.2. We firstly use the dynamic instrumentation techniques to monitor the behavior of the program in the runtime at the points relevant to the suspicious data races. And then we insert the artificial interfere to schedule the threads to trigger the data race conditions as far as possible and at the same time, we use the hybrid dynamic data race detection techniques combined lockset algorithm and happens-before relation to verify and detect data races.3. We also propose the method to parallelize the dynamic data race verification and detection. The main ideal is to decouple the progress of the verification and detection from the application threads to the independent threads. So the multiple cores can be fully utilized to speed up and scale up the progress of the verification and detection.4. We dynamically confirm the potential ad-hoc synchronizations to prune the benign and false data races caused by these implicit synchronizations.5. We also use the static and dynamic techniques to recognize some potential harmful data races which can result to memory bugs to help developers to understand the data race severity better.6. We implemented the above approach and evaluated our detector from the aspects of effectiveness, efficiency and scalability. The results show that our approach can effectively discover the majority of the data races and will not incur the heavy overhead. Also, our approach can scale well and perform stable.
Keywords/Search Tags:multithreaded program, data race detection, lockset, happens-before, ad-hoc synchronization
PDF Full Text Request
Related items