Abstract

The solution to the problem of automatic defects detection in multithreaded programs is covered in this paper. General approaches for defect detection are considered. Static analysis is chosen because of its full automation and soundness properties. Overview of papers about static analysis usage for defect detection in parallel programs is presented. The approach for expansion of static analysis algorithms to multithreaded programs is suggested. This approach is based on Thread Analysis Algorithm. Thread analysis algorithm provides analysis of threads creation and thread-executed functions. This algorithm uses static analysis algorithm results in particular to identify semaphore objects. Thread analysis algorithm and static analysis algorithms are processing jointly. Thread analysis algorithm interprets thread control functions calls (create, join, etc.) and synchronization functions calls (wait, post, etc.). The algorithm determines program blocks which may execute in parallel and interaction pairs of synchronization functions calls. This information is taking into consideration to analyze threads cooperation and detect synchronization errors. To analyze threads cooperation this algorithm uses join of shared objects values in ψ-functions. Basic rules of thread analysis algorithm are considered in the paper. Application of these rules to multithreaded program example is presented. The suggested approach allows us to detect all single-threaded program defect types and some synchronization errors such as Race condition or Deadlock. This approach gives sound results. It obtains analysis of programs with any number of semaphores and threads. It is possible to analyze dynamically created threads. The approach can be extended to other classes of parallel programs and other types of synchronization objects.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call