• DocumentCode
    3368711
  • Title

    Defect detection for multithreaded programs with semaphore-based synchronization

  • Author

    Moiseev, Mikhail

  • Author_Institution
    St.-Petersburg State Polytech. Univ., St. Petersburg, Russia
  • fYear
    2010
  • fDate
    13-15 Oct. 2010
  • Firstpage
    64
  • Lastpage
    70
  • 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.
  • Keywords
    concurrency control; multi-threading; program diagnostics; synchronisation; ψ-functions; automatic defects detection; deadlock; multithreaded programs; parallel programs; race condition; semaphore-based synchronization; static analysis algorithms; synchronization functions calls; thread analysis algorithm; thread control functions calls; thread-executed functions; Algorithm design and analysis; Automation; Electronic mail; Instruction sets; Object recognition; Synchronization; System recovery; Defect detection; multithreaded program; semaphore; static analysis;
  • fLanguage
    English
  • Publisher
    ieee
  • Conference_Titel
    Software Engineering Conference (CEE-SECR), 2010 6th Central and Eastern European
  • Conference_Location
    Moscow
  • Print_ISBN
    978-1-4577-0605-9
  • Type

    conf

  • DOI
    10.1109/CEE-SECR.2010.5783153
  • Filename
    5783153