Font Size: a A A

Research On Deterministic Replay For Multithread Programs

Posted on:2017-01-25Degree:MasterType:Thesis
Country:ChinaCandidate:Z M WangFull Text:PDF
GTID:2348330488459956Subject:Software engineering
Abstract/Summary:PDF Full Text Request
Multithread programming model has become one of the most important programming models to improve the performance of software with the advent of multicore era. However, multithread non-determinism brings challenges to program debugging and fault tolerance. Deterministic replay is an effective way to solve the problem of multithread programs debugging. When a program is executed firstly, some nondeterministic actions are logged. Then the program is forcedly enforced in the same way according to the log. There is a large number of runtime overhead when logging, which has big influence on the execution of the original program. So the research of deterministic replay aims at how to record efficiently the sequence of actions.A record algorithm for the relationship between write actions and read actions is presented to achieve an efficient deterministic replay. The main idea is to log all shared memory write actions and part of read actions using virtual cache. The read action logged is the last one in a thread which happens before a write action. The relationship among all of access to shared memory is obtained by analyzing the log so that decreases the runtime overhead and the log size in the period of recording. Moreover, a multithread execution model and some relationship among actions are defined to interpret the implementation of record and replay algorithm and analyze the performance of our deterministic replay strategy. In order to verify the correctness of our strategy, we prove the consistency of the read-write relationship between replay execution and record execution.A lightweight deterministic replay tool for Java multithread program is implemented based on ASM architecture and JVM TI API. And the structure and the implementation are illustrated in detail. A contrast experiment with state-of-the-art techniques LEAP is conducted with some real-world Java server programs to verify the superiority. In addition, a micro benchmark is designed to illustrate what leads to the runtime overhead when recording. In conclusion, it is proved that the strategy has an advantage on reducing the logging overhead and the size of the log. And the number of write actions has a big influence on the runtime overhead in the period of recording.
Keywords/Search Tags:Multi-core processor, Multithread, Deterministic replay, Shared memory
PDF Full Text Request
Related items