1 / 21

Schedulability-Preserving Transformation of BDF to Petri Nets

This project explores the transformation of Boolean Dataflow (BDF) models to Petri nets while preserving schedulability. The motivation is to apply scheduling techniques for Petri nets to the scheduling problem in BDF models. The proposed transformation includes handling initial tokens, synchronization, and blocking writes. The project also extends consistency to Petri nets and discusses future research directions.

shunk
Download Presentation

Schedulability-Preserving Transformation of BDF to Petri Nets

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A Schedulability-Preserving Transformation of BDF to Petri Nets Cong Liu EECS 290n Class Project December 10, 2004

  2. Outline • Motivation • Scheduling Petri Nets (PN) • Scheduling Boolean Dataflow (BDF) • Proposing a Transformation • Extension of Consistence to PN • Future Research Direction

  3. Motivation • Both BDF and Petri nets are concurrent models. • Both have the scheduling problem • Existence of Bounded Memory Schedules for BDF is undecidable [Buck 93]. • No algorithms can guarantee to find a schedule if one exists. • Petri nets are not Turing complete [Peterson 81]. • Efficient scheduling algorithms exist [Cortedella 00]. • Can we apply scheduling techniques for PN to scheduling BDF?

  4. Motivation • It is known SDF is equivalent to marked graph, a subclass of Petri nets • How about BDF? • If we want to build up equivalence, then what kind of equivalence? • Trace equivalence • Language containment • Simulation relation • What property to preserve during transformation? • Turing-completeness of BDF make transformation applicable to a subclass of BDF

  5. SELECT F T SWITCH F T If-Then-Else using BDF IN >0? while (1) { read (IN, x, 1); if (x>0) y = f(x); else y = g(x); write (OUT, y, 1); } f g OUT

  6. IN X>0? B C OUT If-Then-Else using PN while (1) { read (IN, x, 1); if (x>0) y = f(x); else y = g(x); write (OUT, y, 1); }

  7. D E Boolean Dataflow (BDF) • Consumption/production rate is a two-valued (including zero) function of the value of a Boolean token received by the control port of the actor. • Control ports always transfer exactly one token per execution. • BDF: superset of synchronous dataflow (SDF) [Lee87] A B SWITCH T F T F SELECT F

  8. A B T F D E T F F (A,B,b:D,!b:E,F) Schedules of Boolean Dataflow • A schedule is a finite list of guarded firings, where: • there exists a feasible cyclic firing sequence returning to initial state regardless of values of Boolean controls • Bounded length schedule • Length of cyclic firing sequences are bounded by a constant, E.g. repeat (5) times. • Bounded memory schedule • Length of cyclic firing sequences are bounded by a constant, E.g. repeat (x) times.

  9. Scheduling Boolean Dataflow • Solving balance equation • Consistency check • Simulation to test firability • Clustering • Dynamic scheduling

  10. a p1 b c p2 p3 e d p4 f Petri Nets • A directed graph with two kinds of nodes: place, transition • System state (marking): number of tokens in each place • Transition enabled if enough tokens in all incoming places • Firing a transition consume/produce tokens Free choice set: {b, c} T-invariants: {a, b, d, f}, {a, c, e, f}

  11. null a p1 f a c b p2 p3 p1 e b d c p4 p2 p3 e d p4 f Scheduling Petri Nets • A schedule is a rooted tree • Finite • Nodes → reachable markings, (root → initial marking) Edges → transitions • Transitions in a FCS are fired at each node • Each node has a path to root (if add returning arc)

  12. null a p1 f a c b A B p2 p3 p1 T F e b d c p4 D E p2 p3 T F e d F p4 (A,B,b:D,!b:E,F) f Comparing BDF and PN schedules fire A; fire B; if (B) { fire D; } else { fire E; } fire F;

  13. Challenges to transformation • Petri nets do not distinguish tokens. • Petri nets do not preserve order of tokens. • Proposed solutions: • Use different places to hold tokens with different values • Use synchronization (blocking write) to enforce ordering

  14. A B A B A A pF pF pT pT T F F T F T T F C pT’ pF’ pT’ pF’ C B B C C A Transformation • A set of “True”/ ”False” places express controls. • A set of “Acknowledge” places to synchronize the production and consumption of Boolean tokens.

  15. A Transformation • Strong synchronization enforces blocking write at Boolean control ports A T F A pT’ pF’ pT’ pF’

  16. E E A SWITCH T F T F B C pT1 pF1 F F T SELECT pTa1 paF1 D Handling initial tokens A T F B C T F T F D pT2 pF2 pTa2 paF2

  17. Algorithm Transform (BDF) { transform_SDF_actors; transform_BooleanGenerators; transform_SWITCH; transform_SELECT; handeling_initial_tokes; }

  18. Propositions • Proposition 1 If the transformed Petri net has a bounded length schedule, the corresponding BDF has a bounded length schedule. Sketch of proof: show that Petri net contains a subset of behaviors of BDF. • Proposition 2 If the BDF has a bounded length schedule, the transformed Petri net has a bounded length schedule. Sketch of proof: • Determine exact times each actor to be fired • Transform BDF to acyclic precedence graph (APG) • Decompose Petri net to marked graph component (MGC) • Build up equivalence between APG and MGC

  19. E A SWITCH T F B C F F T SELECT D Extension of Consistence to PN • The restrictions on the values of symbolic variables of a BDF are transformed into the dependence relation of corresponding transitions of the transformed Petri net. For any T-invariants, if it contains transition T of SWITCH, it also contains transition T of SELECT p1 = p2 p1 p2

  20. E E A SWITCH T F T F B C pT1 pF1 F F T SELECT pTa1 paF1 D A T F B C T F T F D pT2 pF2 pTa2 paF2

  21. Future Research Direction • Does the two propositions also holds for bounded memory schedule? • Can generalize the notion of schedule by assuming some kind of fairness? • Assuming program will always exit iterations • Transform a Petri net to a BDF? • Other equivalence alternatives? • More exploration on schedulability and consistence notion for the transformation

More Related