petri nets
play

Petri Nets Chapter 4 Sections 4.3.3 & 4.3.4 - PowerPoint PPT Presentation

Petri Nets Chapter 4 Sections 4.3.3 & 4.3.4 Definition of a Petri net It is a bipartite directed graph with components < P , T , In , Out > Two types of nodes P are


  1. Petri Nets � � Chapter 4 � Sections 4.3.3 & 4.3.4 � � �

  2. Definition of a Petri net �  It is a bipartite directed graph with components 
 � � � < P , T , In , Out > �  Two types of nodes �  P are places �  T are transitions 
 �  Two types of edges � In ! P " T  In are input to transitions � Out ! T " P  Out are output from transitions � PN–2 �

  3. Components of a Petri Net � p1, p2 ∈ P � t1 ∈ T � � (p1 , t1) ∈ In � � (t1 , p2) ∈ Out � PN–3 �

  4. Marked Petri net �  It is a Petri net augment with a marking M �  A marking is a mapping M from places to integers � M : P ! "  Designated by tokens in a diagram � PN–4 �

  5. Example of a Petri net transition firing � LP needed LP needed LP allocated LP allocated Allocate Allocate LP LP LP available LP available B after firing A before firing  A transition can fire when �  Every input place has at least one token �  When a transition fires �  One token is removed from every input place �  One token is added to every output place � PN–5 �

  6. Schematic for modeling semaphores � Have resource Resource Want resource available Free resource Allocate resource Resource available Resource allocated Process does not want resouce Semaphore for free resource Semaphore for get resource PN–6 �

  7. Modeling Mutual Exclusion � PN–7 �

  8. Definition of an event-driven Petri net �  It is a Petri net augment with two additional types of nodes �  I – Input ports �  O – Output ports � In ! ( P ! I ) " T  In and Out include ports � Out ! T " ( P ! O ) PN–8 �

  9. Model for a Single Server � A marked event-driven Petri net PN–9 �

Recommend


More recommend