Font Size: a A A

Dynamic Data Race Concurrency Detection And Verification Based On Hierarchical Filtering

Posted on:2020-09-16Degree:MasterType:Thesis
Country:ChinaCandidate:Y N WuFull Text:PDF
GTID:2428330575491076Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
Multi-threaded is becoming an indispensable programming technique with the widespread use of multi-core systems,often used in the field of operating systems to mobile multimedia applications to improve the performance or responsiveness of specific programs.However,due to the uncertainty in the execution of concurrent threads,writing a properly executed multi-threaded program is much more difficult than writing a correctly executed sequential program.Non-deterministic concurrent accesses to memory may produce non-deterministic output for the same input when threads are not properly synchronized.When this indeterminate thread behavior causes a system failure or an incorrect result,it is called a concurrency bug.Data race is one of the most complex concurrent errors in multi-threaded programs.Due to the concealment of access to Shared memory space and the randomness of concurrent thread execution scheduling,the detection of data race becomes extremely difficult.Dynamic data race detection is necessary to monitor all the execution and analyze every conflicting memory operation in multi-threaded programs,resulting in a large amount of runtime overhead.How to detect and verify data race in a limited time has become an urgent problem to improve software reliability and security.This paper focuses on the large amount of additional overhead generated by the existing dynamic data race detection,and cannot accurately find harmful race.A hierarchical filtering method is proposed to reduce the high performance overhead of dynamic monitoring program execution behavior,and to efficiently detect data race and verify harmful race in multi-threaded programs through two concurrency strategies.First,the algorithm uses the binary instrumentation tool Pin to remove respectively unnecessary monitored memory operations from Image level(IML),Section level(SEL),Instruction level(INL)and Code level(COL),reducing redundant data in the original trace.Secondly,the trace information extracted by the Pin tool is divided into multiple independent sets based on the HashMap and added to the multi-process task queue.Each process is dynamically scheduled by the process pool,and the potential data race in the multi-threaded concurrent program is concurrently analyzed offline according to the combination of the lockset algorithm and the happens-before relationship.Then,the weighted Round-Robin algorithm then divides the potential race onto multiple cloud servers on demand.Combine thread scheduling techniques to delay blocking to create race conditions as much as possible.Concurrent verification of potential race on multiple cloud servers identifies harmful data race.Finally,a dynamic data race detection tool was designed and implemented.The test was carried out from the aspects of data race detection accuracy,detection efficiency and method extensibility.The test results showed that MMCRace could effectively detect and verify data race and would not have a great impact on the performance of the original program.
Keywords/Search Tags:dynamic data race, hierarchical filtering, lockset algorithm, happens-before relationship
PDF Full Text Request
Related items