Modeling Multithreaded Applications Using Petri Nets

Since most modern computing systems contain multiple processing elements, applications are relying on multithreaded programming techniques that allow a program to execute multiple tasks concurrently to take advantage of the processing capabilities. Multithreaded programs are more difficult to design and test because of the nondeterministic execution orders and synchronization among the threads. Different approaches can be used to test Multithreaded Applications. In our approach we use Petri nets to represent the key elements of interactions among threads to identify potential problems such as race conditions, lost signals, and deadlocks. A tool called C2Petri has been developed which converts C-Pthreads programs to the equivalent Petri net model. This tool helps verification of Pthread-based programs. At present the tool has limited capabilities and we hope to expand the capabilities of our tool in the near future.

[1]  Krishna M. Kavi,et al.  Isomorphisms Between Petr Nets and Dataflow Graphs , 1987, IEEE Transactions on Software Engineering.

[2]  Lori A. Clarke,et al.  Flow Analysis for Verifying Specifications of Concurrent and Distributed Software , 1999 .

[3]  Bryan Cantrill,et al.  ThreadMon: a tool for monitoring multithreaded program performance , 1997, Proceedings of the Thirtieth Hawaii International Conference on System Sciences.

[4]  Leslie Lamport,et al.  How to Make a Multiprocessor Computer That Correctly Executes Multiprocess Programs , 2016, IEEE Transactions on Computers.

[5]  Krishna M. Kavi,et al.  Specification and Analysis of Real-Time Systems Using CSP and Petri Nets , 1996, Int. J. Softw. Eng. Knowl. Eng..

[6]  Monika Heiner,et al.  Petri Net Based Software Validation Prospects and Limitations , 2004 .

[7]  Peter Baer Galvin,et al.  Applied Operating System Concepts , 1999 .

[8]  Abraham Silberschatz,et al.  Operating System Concepts , 1983 .

[9]  Michael Burrows,et al.  Eraser: a dynamic data race detector for multithreaded programs , 1997, TOCS.

[10]  Abraham Silberschatz,et al.  Applied Operating System Concepts, First Edition , 2000 .

[11]  Joseph Sifakis,et al.  Iterative Methods for the Analysis of Petri Nets , 1980, Selected Papers from the First and the Second European Workshop on Application and Theory of Petri Nets.

[12]  Tadao Murata,et al.  Petri nets: Properties, analysis and applications , 1989, Proc. IEEE.

[13]  Jörn W. Janneck,et al.  Modeling hierarchical and recursive structures using parametric Petri nets , 1998 .