Professional Documents
Culture Documents
Stetsenko Inna V.
Dyfuchyna Oleksandra
Igor Sikorsky Kyiv Polytechnic Institute
Related works
• Peterson, J.: Petri Nets Theory and the
Modelling of Systems (1981)
• Kavi, K., Moshtaghi, A., Chen, D.: Modeling
Multithreaded Applications Using Petri
Nets(2002)
• Katayama, T., Kitano, S., Kita, Y., Yamaba, H.,
Okazaki, N.: Proposal of a Supporting Method
for Debugging to Reproduce Java Multi-
threaded Programs by Petri-net(2014).
Obj 3 Obj 2
Obj1 Event
initializing Obj 3
Common
place
Obj 1
Obj 2 Obj 4
Consumer
Producer
signal from
notify
wait
put
1 buffer’s free places
k take
lock unlock
loop bowB++
for{ imp{ trylockA trylockB bowBack
unlockAB
1000
1 bowA++
unlockA
1 lockA
1 unlockB
failure++
for} lockB
trylockB
failure
Friend B
tryLockB tryLockA
lockA lockB
1 1
tryLockA tryLockB
Friend A
friendA.addFriend(friendB);
friendA.addFriend(friendC);
friendA.addFriend(friendD);
friendB.addFriend(friendA);
friendB.addFriend(friendC);
friendB.addFriend(friendD);
friendC.addFriend(friendA);
friendC.addFriend(friendB);
friendC.addFriend(friendD);
friendD.addFriend(friendA);
friendD.addFriend(friendB);
friendD.addFriend(friendC);
} © Stetsenko I.V., Dyfuchyna O. 14
Petri-object model program code
public static void main(String[] args) throws ExceptionInvalidNetStructure {
ArrayList<PetriSim> list = new ArrayList<>();
//Petri-objects creation
list.add(friendA);
list.add(friendB);
list.add(friendC);
list.add(friendD);
model.setIsProtokol(false);
model.go(100000000);
}
f 0,8 d=100
0,7 d=10
0,6 d=1
0,5
0,4
0,3
0,2
0,1
0
r=0,001 r=0,01 r=0,1 r=0,5 r=0,8 r=1
10
0.987777 0.979080 0.88%
(90 workers)
20
0.988047 0.980910 0.72%
(380 workers)
50
0.995212 0.981585 1.37%
(2450 workers)