MECS 16. Petri Nets - > : > @ @ @ @ :16 @ Modeling...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: > : > @ @ @ @ :16 @ Modeling and Evaluation of Computer Systems (MECS) : (Mohammad Abdollahi Azgomi) azgomi@iust.ac.ir @ @ :@ @ @ @ @ @ @ @ @ @ :@ @ @ @ @ @ @ @ @ @ @ @ MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ > @ > @ . . @ @ @ > (formalism) @ > @ .> @ > @ < @ @ @ > > (textual modeling language) @ > < : (process algebras) @ (CSP: Communicating Sequential Processes) (CCS: Calculus of Communicating Systems) @ >< .(Petri nets) @ > @ > @ < < > MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ > @ @ @ @ > @ @> > @ @ @ < > . > @ > > @ (net models) @ @ 1962 > (Petri nets) @ < > <(Carl Adam Petri) . (concurrent systems) MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ (formal basis) @ @ @ .> < > > @ @ @ @ @ @ @ > > . @ @ @ : : > > @ > . @ @ (Petri net automaton) @ @ < (bag theory) . > @ (mutiset) >@ MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ (graphical notations) @ @ @ @ > >> @ @ > . @ @ @ @ : > : @ > > <@ @ > @ < . @ > @ <UML > > < @ . @ MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ > @ @ : @ > (primitive) (state) (action) :@ <> > > .> > > @ @ @ (place) (transition) @ > MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ @ @ >@ @ > .> > @ > (static structure) > > (Petri net graphs) @ @ (dynamic behavior) @ >@ @ @ (Petri net marking) @ @ (Petri net execution rules) @ @ < @ . MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ (Petri net structure) @ @ :1 C = (P, T, I, H, O) P T . (P T = ) : >T @ . @ P @ P @ @ .(P = {p1, p2, ..., pn}) <(T = {t1, t2, ..., tm}) (input function) @> Bag(P) (output function) (inhibition function) > . I: T Bag(P) > O: T Bag(P) . H: T Bag(P) @ MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ C = (P, T, I, H, O) P = {p1, p2, p3, p4, p5} T = {t1, t2, t3, t4} O(t1) = {p2, p3, p5} O(t2) = {p5} O(t3) = {p4} O(t4) = {p2, p3} I(t1) = {p1} I(t2) = {p2, p3, p5} I(t3) = {p3} I(t4) = {p4} MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE > <(t ot ) t > @ : @> @ ( > t) t <t T > @ (t @ >) t = { p P : I(t, p) > 0 } t = { p P : O(t, p) > 0 } ot = { p P : H(t, p) > 0 } :> . I(t) >p t (> > @> @ > ) (multiplicity) <Bag(P) > > <I(t) I(t, p) . > MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ >> > @ > > >@ @ : > @> p3 p1 t1 p2 @> MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ @ . @ < @ > >> >> >> > > : (places) (transitions) . (arcs) . > > (token) > < > (marking) @ . > MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ . > : > @ > > @ @ . @ @ @ @ @ > > @ @ (bipartite directed multigraph) : .> >> ( ) @> .(> ( ) > > @ @ > @ > )> >> @> n : @ (mutiplicity) >> : @> (directed arcs) > @ @ > @> @ @ : > m @ : (inhibitor arcs) @ > > > @ @ MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ >> : @ >@ @ @ @ @ > p2 t4 t3 p3 p1 t1 p5 t2 p4 MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE > @ MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ @ >< @ @ > . . > . @ (Petri net @ @ (marking) @ . @ > @ @ > @ @ @ < . @ @ < > (source code) @ @ . > (execution rules) @ @ system) MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ . @ .> m0 @ >> > @ (marking) @ > (token) M < @ @ @ .> @ . @ @ @ : > > 12 :> @ @ (N) >> m @ . @ >@ @ > >> M0 < 0 > > > > (initial marking) > > > > < @ > > > MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ @ MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ C = (P, T, I, H, O, M0) . @ > @ @ : (1) @ . :2 @ M 0: P N @ O H <I <T <P MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ . k @ >p1 @ > > > @ > t5 > P = {p1, p2, p3 , p4, p5, p6, p7} T = {t1, t2, t3 , t4, t5, t6, t7} I(t1) = {p1} I(t2) = {p2} I(t3) = {p2} I(t4) = {p3, p5} I(t5) = {p4, p5} I(t6) = {p6} I(t7) = {p7} O(t1) = {p2} O(t2) = {p3} O(t3) = {p4} O(t4) = {p5, p6} O(t5) = {p7} O(t6) = {p1} O(t7) = {p1, p5} H(t5) = {p6} M0 = {k, 0, 0, 0, 1, 0, 0} MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE > : . . >> >> > (firable) <@> @ @ > (enabled) > > @> @ @ <@ > @ > . . p2 > . t1 t1 >< > .> > > @ > @ p1 t1 p2 p3 p1 t1 p2 p3 : t1 : t1 M(p1)1 & M(p2)1 = false MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE M(p1)1 & M(p2)1 = true > n> . p1 > >> :> > m > p2 t > > @ >t >> > M(p1) n & M(p2) < m MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ > @ @ .> > m' : m Pi tk (1) @ < @ tk tk m' @ m@ > (fire) > > >> : : Pi tk (3) : Pi (2) tk @> Pi : tk (4) @> MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE > : o > M@ @ >t :3 > p t , M ( p) I (t , p) p t , M ( p ) < H (t , p ) and : > @ . @ . t t t > > (t) @> (t) > > M @ : > t @ > <> :4 M' @ M' = M + O(t) I(t) . > M [t M' t > MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE > : @ 2 H2 t O2 2 2H2 + O2 2H2O M = (2, 2, 0) H2O : 2 H2 t O2 MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE t > 2 M' = (0, 1, 2) H2O @ .> > >> . @ @ @ < > @ > @ > @ . @ . @ : (completion) > > > (non-deterministic) (@ . .> > > ) @ @ . @ @ @ < (distributed) @ > > (concurrent) MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ > @ @ > : M0 = (1, 2, 0, 2, 1) : @ p2 t4 t3 p3 p1 t1 p5 t2 p4 MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ < @ t4 t3 < t1 @ : t1 @ . > p2 t4 t3 p3 p1 t1 p5 t2 p4 MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ :> M1 = (0, 3, 1, 2, 2) @ @ t1 > p2 t4 t3 p3 p1 t1 p5 t2 p4 ... t2 < t4 t3 < t2 @ M1 @ > MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ :> M2 = (0, 2, 0, 2, 2) @ @ t2 > p2 t4 t3 p3 p1 t1 p5 t2 p4 ... t3 < t4 t3 @ M2 @ > MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ :> M3 = (0, 2, 1, 1, 2) @ @ t2 > p2 t4 t3 p3 p1 t1 p5 t2 p4 ... t2 < t4 t3 < t2 @ M3 @ > MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ :> M4 = (0, 1, 0, 1, 2) @ @ t2 > p2 t4 t3 p3 p1 t1 p5 t2 p4 ... t4 < t4 t3 M4 @ > MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ :> M5 = (0, 2, 1, 0, 2) @ @ t4 > p2 t4 t3 p3 p1 t1 p5 t2 p4 ... t2 M5 @ > MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ :> M6 = (0, 1, 0, 0, 2) @ @ t2 > p2 t4 t3 p3 p1 t1 p5 t2 p4 .> . > @ @ @ > M6 @ < > > > @ (non-terminating) MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ . < >@ @ @ @ @ @ . @ @ @ : @ @ @ . @ @ > @ @ @ @ @ @ @ (concurrency models) @ > @ > <(sequential actions) <(synchronization) <(merging) <(cuncurrency) <(conflict) .(limited resources) > > > @ (building blocks) @ @ @ @ < > @ > .> > @ MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ < >> a2 a1 > t2 t1 > > @ . > . a2 a2 >@ : p2 t2 p3 a1 a1 @ > > > p3 p2 < p1 > a2 a1 p1 t1 . t1 t1 t1 t2 @ .> . @ t2 t2 p1 > > p2 p2 > ... MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ @ p1 t1 p2 t2 p3 MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ @ p1 t1 p2 t2 p3 MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ @ p1 t1 p2 t2 p3 MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ > t1 <t3 a2 a1 a3 < > @ >@ a2 a1 > . a3 @ > a3 @ > > > .> (synchronize) @ @ p3 p2 < p1 > @ > . a2 a1 a3 @ > : t1 p1 t3 t2 p2 p3 @ t2 t3 t2 t1 > . > MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ @ t1 p1 t3 p3 t2 p2 MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ @ t1 p1 t3 p3 t2 p2 MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ @ t1 p1 t3 p3 t2 p2 MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ @ t1 p1 t3 p3 t2 p2 MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ @ t1 p1 t3 p3 t2 p2 MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ > t3 @ t2 t1 @ @ > :> > @ t2 t1 @ < t3 > > @ t1 p1 t3 p3 t2 p2 p4 MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE > @ @ > > >. @ > > : > t1 . . . pin tmerge pout tn MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ > . > > @ @ <> @ tn t1 @ <T ... >@ . > in1 . . . T t1 . . . out1 . . . inn tn outn MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ @ in1 . . . T t1 . . . out1 . . . inn tn outn MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ @ in1 . . . T t1 . . . out1 . . . inn tn outn MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ >> @ p2 <> p2 > . a1 <t1 > ...> @ > >@ > > .> .> >. > .> t2 t2 > >@ t1 (conflict) @ @ > > a2 @ > p1 t1 p2 t2 p3 MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ p1 t1 p2 t2 p3 MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ > > >> . > > (deadlock) @ :> @ > > > > > @ . MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE > < @ > > > .> @ @ @ > C1 C2 @> . > > > > @ MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE > >. @ p3 > . .> > @ @ > p2 @ > @ p2 MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE > .. @ t1 > MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE > ...> @ t2 t1 > MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE > t2 t1 > ... @ . t2 t1 > . MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE > > p3 p1 > @ t2 > ...> MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE > > < t2 t1 t2 > @ @ > . ... > t3 > t3 > > MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE > > .> .> p3 @ p3 p2 > MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE .> > > @ < > @ @ (producer/consumer) . > @ > >> @ . ... > > > <> MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE > @ > - > MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ > - MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ > - MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ > >> . > > Process1 P4 >> @ .> > > @ @ ... @ > (mutual exclusion) @ > .> > @ > > > > @ .> > > Process2 > > MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ > > > < > : > > (dining philosophers) @ > . > @ > > ... > > < @ . MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ @ > > . > @ > .> !> <> > > > ... @ @ > MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ >@ > hasleft1 takeleft1 hasright1 takeright1 thinking1 hasleft4 takeleft4 hasright4 takeright4 thinking4 1 eating1 chopstick1 4 eating4 chopstick4 hasleft2 takeleft2 hasright2 takeright2 thinking2 hasleft5 takeleft5 hasright5 takeright5 thinking5 2 eating2 chopstick2 5 eating5 chopstick5 hasleft3 takeleft3 hasright3 takeright3 thinking3 3 MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE eating3 chopstick3 @ >@ : < < < < < . > > > > > @ @ > @ @ > @ @ @ @ @ @ @ @ > > chopstick1 @ thinking1 @ takeright1 @ hasright1 @ takeleft1 @ eating1 @ > chopstick5 thinking5 takeright5 hasright5 takeleft5 eating5 @ @ @ > chopstick5 >. . chopstick1 @ @ > thinking5 > takeright5 > thinking1 takeright1 ... MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ >@ > hasleft1 takeleft1 hasright1 takeright1 thinking1 hasleft4 takeleft4 hasright4 takeright4 thinking4 eating1 chopstick1 eating4 chopstick4 hasleft2 takeleft2 hasright2 takeright2 thinking2 hasleft5 takeleft5 hasright5 takeright5 thinking5 eating2 chopstick2 eating5 chopstick5 hasleft3 takeleft3 hasright3 takeright3 thinking3 eating3 chopstick3 MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ >@ takeright5 > takeright1 @ > > > ... > MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ >@ > hasleft1 takeleft1 hasright1 takeright1 thinking1 hasleft4 takeleft4 hasright4 takeright4 thinking4 eating1 chopstick1 eating4 chopstick4 hasleft2 takeleft2 hasright2 takeright2 thinking2 hasleft5 takeleft5 hasright5 takeright5 thinking5 eating2 chopstick2 eating5 chopstick5 hasleft3 takeleft3 hasright3 takeright3 thinking3 eating3 chopstick3 MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ >@ > > > > > . . > @ > > > > > > @ > .> ... > > MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE @ eating1 hasboth1 takeboth1 thinking1 chopstick2 chopstick1 > eating5 hasboth5 takeboth5 thinking5 chopstick5 thinking2 takeboth2 hasboth2 eating2 chopstick3 thinking3 chopstick4 thinking4 takeboth4 hasboth4 eating4 takeboth3 hasboth3 eating3 MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE > > . . (vending machine) > > > : > > @ > > > > @ >@ @ > > > @ (ATM) > > MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE > > 10 5 . > > > > .> @ > > > (FSM) ...> @ > . @ > 20 15 . @ > > MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE > @ Take 15c snack bar FSM p De it os 5c 5 cents Deposit 10c 15 cents Deposit 5c 0 cent De po s si po De c t5 Deposit 5c it 10 c 10 cents Deposit 10c 20 cents Take 20c snack bar MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE > Take15cBar @ @ Deposit10c2 15c 5c Deposit5c1 Deposit5c2 0c Deposit5c3 Deposit5c4 Deposit10c1 10c 20c Deposit10c3 Take20cBar MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE > : @ @ @ @ :1 Deposit 5c, deposit 5c, deposit 5c, deposit 5c, take 20c snack bar. :2 Deposit 10c, deposit 5c, take 15c snack bar. :3 Deposit 5c, deposit 10c, deposit 5c, take 20c snack bar. ...> > @ > > MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE > Take15cBar @ Deposit10c2 @ 15c 5c Deposit5c1 Deposit5c2 0c Deposit5c3 Deposit5c4 Deposit10c1 10c Deposit10c3 20c Take20cBar MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE > > > . . > > > . > > .(approved) @ @ 4> @ > > (ATM) > > > > OK > (reject) > < > .> @ @ > > @ > > > FSM ...> > > > > 4 > MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE > > 1 digit 1 digit > 1 digit @ FSM 1 digit Initial d1 d2 d3 d4 OK OK OK OK OK pressed approve Rejected Reject Initial state Approved Final state MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE > > Digit1 Digit2 > @ Digit3 @ Digit4 d4 Initial d1 d2 d3 OK4 OK1 OK2 OK3 OK Pressed Approve Rejected Reject Approved MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE > > : . . OK OK > > > > @ @ > > @ @ 4 3 > > :1 :2 > MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE > > Digit1 Digit2 > @ Digit3 @ Digit4 d4 Initial d1 d2 d3 OK4 OK1 OK2 OK3 OK Pressed Approve Rejected Reject Approved MECS#16 - Petri Nets - By: M. Abdollahi Azgomi - IUST-CE ...
View Full Document

This note was uploaded on 04/08/2010 for the course COMPUTER E 409232 taught by Professor Mohammadabdolahiazgomiph.d during the Spring '10 term at Islamic University.

Ask a homework question - tutors are online