J4 ›› 2015, Vol. 42 ›› Issue (2): 167-173+212.doi: 10.3969/j.issn.1001-2400.2015.02.028

• Original Articles • Previous Articles     Next Articles

Concurrency bug test for a class of multithreaded software

ZHU Chengcheng1;DONG Lida1,2   

  1. (1. Institute of Electronic Circuit and Information System, Zhejiang Univ., Hangzhou 310027, China; 2. Hangzhou Institute of Service Engineering, Hangzhou Normal Univ., Hangzhou 311121, China)
  • Received:2013-12-12 Revised:2014-03-10 Online:2015-04-20 Published:2015-04-14
  • Contact: ZHU Chengcheng E-mail:zhuchengcheng@live.cn

Abstract: Due to the sharing of resources, the deadlocks often occur as concurrency bugs in multithreaded software. This paper utilizes the Petri net to model multithreaded software and use the mixed integer programming tool to test the concurrency bugs in it. Currently, multithreaded software using the mutex can be modeled and tested by the Gadara nets. Multithreaded software using semaphores can be modeled by S*PRnets, but there is no theory to support the mixed integer programming-based concurrency bugs test method for them. This paper defines a subclass of S*PRnets, i.e., SEM-S*PRnets. The initial marking of resource places in it can be greater than 1 and branches can use resources symmetrically. Thus, it can model a class of multithreaded software using semaphores. By structural analysis, it can be proved that a SEM-S*PRnet is live if and only if all its siphons are always marked during execution. This result ensures that the mixed integer programming techniques can also be applied for detecting concurrency bugs in multithreaded software modeled by SEM-S*PRnets. Finally, two concurrency bug test examples are introduced, and the results show the validity of this work.

Key words: multithreaded software, petri nets, S*PRnet, deadlock test, mixed integer programming

CLC Number: 

  • TP301.1

Baidu
map