Font Size: a A A

Design And Implementation Of Exception Handling Mechanism For Concurrency Bugs

Posted on:2013-02-04Degree:MasterType:Thesis
Country:ChinaCandidate:R M NiuFull Text:PDF
GTID:2218330362959443Subject:Software engineering
Abstract/Summary:PDF Full Text Request
With the extensive use of multi-core processors, research on concurrent programming technology has been greatly promoted. Due to inherent non-deterministic nature of concurrent programs, it is very difficult to detect and handle concurrency bugs. So the correctness of concurrent programs is difficult to be guaranteed. Generally speaking, concurrency bugs detection at compile time and preventing the occurrence of concurrency bugs at runtime are very important. In the past few decades, there is a lot of research work on the fault-tolerant mechanism for concurrent programs. Especially relative to the locking performance and complexity, researchers have proposed a mechanism in the software and hardware synchronization mechanisms through transactions in order to achieve fault tolerance. Relative to the lock, the software transactional memory system[1] is relatively simple(ensure atomicity without lock) and more efficient. In terms of atomicity, software transactional memory can provide fault tolerance for its support. However, this work is also dependent on the supports of atomic block programmer declared. When the atomic block programmer declared can not guarantee the correctness of concurrent programs, it is still necessary to detect concurrency bugs through analysis and testing. Current study can not detect variety kinds of concurrency bugs and handle them at runtime to prevent the disaster due to them.Taking into account the common types of concurrency bugs, this thesis presents a fault-tolerant mechanism for concurrent programs, which handles concurrency bugs like division by zero exception and achieves fault tolerance by program state rollback based on the exception thrown out in program execution.This thesis aims at providing a fault tolerance framework for concurrency bugs by means of exception handling mechanism to improve the reliability of concurrent programs. There is no previous work like this, which handles concurrency bugs (mainly atomicity violation) as exception and extends the exception handling mechanism of programming language. There are several innovations which are reflected in the following aspects on the specific implementation details of the entire system:(1) Program static analysis and instrumentation: We identify the shared variables between threads through the program static analysis, perform code instrumentation based on the read and write operations to these variables.(2) Program dynamic analysis: It mainly indicates dynamic detection of concurrency bugs, which records the read and write operation sequence of shared variables and then matches the atomicity violation patterns to discover concurrency bugs. The algorithm makes lower overhead at runtime and there is a big advantage compared to current related work.(3) Exception handling mechanism: The idea of handling concurrency bugs as exception is innovate and it provides a different way of handling concurrency bugs compared to the previous approaches, which allows the programmer to customize exception handling based on the exception message. They improve program reliability and also improve the flexibility of handling concurrency bugs.
Keywords/Search Tags:exception handling, fault tolerance mechanism, concurrent, multithreaded
PDF Full Text Request
Related items