A Schedulability-Preserving Transformation Scheme from Boolean- Controlled Dataflow Networks to Petri Nets

Similar documents
By: Chaitanya Settaluri Devendra Kalia

Petri Nets ee249 Fall 2000

Mapping and architecture exploration

EE 249 Discussion: Synthesis of Embedded Software using Free- Choice Petri Nets

LabVIEW Based Embedded Design [First Report]

EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization

Overview of Dataflow Languages. Waheed Ahmad

Outline. Petri nets. Introduction Examples Properties Analysis techniques. 1 EE249Fall04

Embedded Systems 7 BF - ES - 1 -

Byzantine Consensus in Directed Graphs

An Algorithm to Compute a Basis of Petri Net Invariants

Implementation of Process Networks in Java

Dataflow Languages. Languages for Embedded Systems. Prof. Stephen A. Edwards. March Columbia University

Petri Nets: Properties, Applications, and Variations. Matthew O'Brien University of Pittsburgh

Hierarchical FSMs with Multiple CMs

EE249 Discussion Petri Nets: Properties, Analysis and Applications - T. Murata. Chang-Ching Wu 10/9/2007

Lecture 4: Synchronous Data Flow Graphs - HJ94 goal: Skiing down a mountain

Embedded Systems 8. Identifying, modeling and documenting how data moves around an information system. Dataflow modeling examines

Joint Entity Resolution

CA441 BPM - Modelling Workflow with Petri Nets. Modelling Workflow with Petri Nets. Workflow Management Issues. Workflow. Process.

Concurrent Models of Computation

From Task Graphs to Petri Nets

STATIC SCHEDULING FOR CYCLO STATIC DATA FLOW GRAPHS

Concurrent Models of Computation

Embedded Systems 7. Models of computation for embedded systems

APETRI net (PN) (cf. [1] [3]) is said to be live if it is possible

DISCRETE-event dynamic systems (DEDS) are dynamic

Static Scheduling and Code Generation from Dynamic Dataflow Graphs With Integer- Valued Control Streams

Fundamental Algorithms for System Modeling, Analysis, and Optimization

A counter-example to the minimal coverability tree algorithm

Compositionality in Synchronous Data Flow: Modular Code Generation from Hierarchical SDF Graphs

Łabiak G., Miczulski P. (IIE, UZ, Zielona Góra, Poland)

Symbolic Buffer Sizing for Throughput-Optimal Scheduling of Dataflow Graphs

Building Synchronous DataFlow graphs with UML & MARTE/CCSL

EE213A - EE298-2 Lecture 8

Data Flow Graph Partitioning Schemes

Module 11. Directed Graphs. Contents

Coverability Graph and Fairness

Lecture Notes on Program Equivalence

Parameterized Modeling and Scheduling for Dataflow Graphs 1

A Simple Example. The Synchronous Language Esterel. A First Try: An FSM. The Esterel Version. The Esterel Version. The Esterel Version

Consistency and Set Intersection

Final Exam 2, CS154. April 25, 2010

Computational Models for Concurrent Streaming Applications

PETRI NET MODELLING OF CONCURRENCY CONTROL IN DISTRIBUTED DATABASE SYSTEM

Resource-bound process algebras for Schedulability and Performance Analysis of Real-Time and Embedded Systems

fakultät für informatik informatik 12 technische universität dortmund Data flow models Peter Marwedel TU Dortmund, Informatik /10/08

Node Prefetch Prediction in Dataflow Graphs

The Resolution Algorithm

Embedded Systems CS - ES

APPLICATION OF COLORED PETRI NET IN MODELING OF AN AGRICULTURAL ENTERPRISE INFORMATION MANAGEMENT SYSTEM

2386 IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 52, NO. 6, JUNE 2006

Handout 9: Imperative Programs and State

Using Petri Nets to Enhance Web Usage Mining 1

Synthesis of Complicated Asynchronous Control Circuits Using Template Based Technique

Reducing Clocks in Timed Automata while Preserving Bisimulation

Modular Petri Net Processor for Embedded Systems

Genetic Process Mining: A Basic Approach and its Challenges

3 No-Wait Job Shops with Variable Processing Times

Lecture 1 Contracts : Principles of Imperative Computation (Fall 2018) Frank Pfenning

Hierarchical Reconfiguration of Dataflow Models

Software Synthesis from Dataflow Models for G and LabVIEW

Model checking pushdown systems

Computation of enabled transition instances for colored Petri nets

Bounded Scheduling of Process Networks. Thomas M. Parks. B.S.E (Princeton University) in the

ANALYZING PROCESS MODELS USING GRAPH REDUCTION TECHNIQUES

From synchronous models to distributed, asynchronous architectures

Petri Net-based Thread Composition for Improved System Level Simulation

System Correctness. EEC 421/521: Software Engineering. System Correctness. The Problem at Hand. A system is correct when it meets its requirements

Computer Science Technical Report

Hierarchical Reconfiguration of Dataflow Models

WEEK 5 - APPLICATION OF PETRI NETS. 4.4 Producers-consumers problem with priority

Integer Programming Theory

Binary Decision Diagrams

Counting Interface Automata and their Application in Static Analysis of Actor Models

CONSIDERATIONS CONCERNING PARALLEL AND DISTRIBUTED ARCHITECTURE FOR INTELLIGENT SYSTEMS

Semantics via Syntax. f (4) = if define f (x) =2 x + 55.

An algorithm for Performance Analysis of Single-Source Acyclic graphs

Removing Belady s Anomaly from Caches with Prefetch Data

MODERN automated manufacturing systems require. An Extended Event Graph With Negative Places and Tokens for Time Window Constraints

Fachgebiet Softwaretechnik, Heinz Nixdorf Institut, Universität Paderborn. 4. Testing

SysteMoC. Verification and Refinement of Actor-Based Models of Computation

On The Theoretical Foundation for Data Flow Analysis in Workflow Management

CS 6110 S14 Lecture 38 Abstract Interpretation 30 April 2014

Hardware Software Codesign

6. Lecture notes on matroid intersection

Modeling Hybrid Systems with Petri Nets

SDL. Jian-Jia Chen (slides are based on Peter Marwedel) TU Dortmund, Informatik 年 10 月 18 日. technische universität dortmund

Main application of SDF: DSP hardware modeling

Languages and Compilers

(b) Linking and dynamic graph t=

IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN OF INTEGRATED CIRCUITS AND SYSTEMS, VOL. 16, NO. 8, AUGUST

[module 2.2] MODELING CONCURRENT PROGRAM EXECUTION

MODELING INTERACTIVE SYSTEMS WITH HIERARCHICAL COLORED PETRI NETS

A Verification Approach for GALS Integration of Synchronous Components

Petri Nets. Robert A. McGuigan, Department of Mathematics, Westfield State

Timed Circuit Verification Using TEL Structures

Lecture 19 Thursday, March 29. Examples of isomorphic, and non-isomorphic graphs will be given in class.

CHAPTER 5 GENERATING TEST SCENARIOS AND TEST CASES FROM AN EVENT-FLOW MODEL

Well-behaved Dataflow Graphs

Transcription:

Schedulability-Preserving ransformation Scheme from oolean- ontrolled Dataflow Networks to Petri Nets ong Liu Edward. Lee University of alifornia at erkeley erkeley,, 94720, US {congliu,eal}@eecs. berkeley.edu bstract his paper presents a transformation scheme from oolean-controlled dataflow (D) networks to Petri nets (PN) that has the following properties. D has a bounded length schedule, if and only if the transformed Petri net has a bounded length schedule. D has a bounded memory schedule if the transformed PN has a bounded memory schedule. he existence of bounded memory schedule of D is proved to be undecidable. his transformation scheme provides a way to construct a bounded memory schedule of a D using exsiting PN scheduling techniques. In D models tokens are associated with data, and actors communicate through IO channels. general PN semantics does not distinguish tokens and does not preserve the order of tokens in a place. he proposed method uses different places to hold the oolean tokens with different values. he ordering of oolean tokens at each control input port is preserved by enforcing that new oolean tokens are not produced until the previous oolean token is consumed. Initial oolean control tokens are handeled by use of a preamble. urthermore, based on the transformation, the consistence notion originally defined in D is extended to PN. 1 Introduction he ever-increasing complexity of embedded systems require designers to use formal models to precisely describe system behaviors and hide implementation details. oncurrent models, such as dataflow networks [6], Kahn process networks [4][5], and ommunicating Sequential Processes [3], are often used because they explicitly express the inherent concurrency in most embedded system applications. In a concurrent model, a system is consisted of a set of processes which communicate with the environment and other processes, and run at their own speed. hese concurrent processes often share a physical resource (e.g. PU). Hence, their implementation often requires solving a fundamental scheduling problem, i.e. sequencing the operations of concurrent processes under certain constraints (e.g. bounded memory). Depending on when the scheduling decision are made, scheduling algorithms are classified as three categories. Static scheduling makes all decisions at compile-time. Quasi-static scheduling computes a static schedule as much as possible while leaving data-dependent choices resolved at run-time. Dynamic scheduling make all decisions at run-time. Static scheduling is restricted to specifications without run-time choices, such as the specifications modeled by synchronous dataflow (SD) networks [6]. Lee and uck extended SD to oolean-controlled dataflow (D) network [1] by introducing actors that have conditional production and consumption rate. It can model specification with run-time data-dependent choices. In fact, D is proved to be equivalent to a universal uring machine. It means any program can be modeled by a D. However, the scheduling problem, the existence of bounded memory schedule, is undecidable. It means no algorithms can prove or disprove schedulability of an arbitrary D in finite time. ll existing D scheduling techniques, such as bounded length scheduling, clustering, and stateenumeration, are based on heuristics. hey can successfully construct schedules only for a subset of schedulable D. his paper presents a transformation scheme from D to Petri Nets (PN) [7]that has the following properties. D has a bounded length schedule, if and only if the transformed Petri net has a bounded length schedule. D has a bounded memory schedule if the transformed PN has a bounded memory schedule. Hence, this transformation scheme provides a way to construct a bounded memory schedule by taking advantage of exsiting PN scheduling techniques. he most recent advancement [2] on quasi-static

scheduling of PN adopts a -invariant-guided state space search. -invariant is a set of instances of transitions. If they are fired, the resulting state is the same as before the firings. In this approach, the heuristic used to prune the search space considers the pre-history of a state and is not based on a local property, such as the place bound. Hence, it is more justifiable than those using simple bounding box on state space. Directly apply the PN scheduling techniques to D or any state enumeration based D scheduling algorithms have the state explosion problem, because the state of a D is determined not only the number of tokens on each arc, which corresponds to the state of a PN, but also the value and the order of the tokens. his problem makes direct state enumeration inefficient. In D models tokens are associated with data, and actors communicate through IO channels. general PN semantics does not distinguish tokens and does not preserve the order of tokens in a place. he proposed method uses different places to hold the oolean tokens with different values. he ordering of oolean tokens at each control input port is preserved by enforcing that new oolean tokens are not produced until the previous oolean token is consumed. he tranformed PN is equivalent to the original D with the constraint that the control arcs, which connects to control port, have a bound of exact one. his implies that the traces contained in the PN is subset of traces contained in the D. Note that we do not impose bounds on arcs except control arcs. So if there are more than one initial oolean control tokens in a D, it may be possible that after a finite number of firings the D reach a state where there is at most one oolean tokes on each control arc. hen the proposed transformation still applies. inally the consistence notion originally defined in D is extended to PN. his is due to the fact there is a one-to-one correspondence between the complete cycles in a D and the -invariants in the transformed PN. he transformation scheme preserves consistence. he following of the paper is organized the following. In Section 2, we introduce basic definitions and notations of D and Petri nets and their scheduling. tranformation scheme from a D to a Petri net is described in Section 3. 2 Preliminaries 2.1 oolean-controlled dataflow network D extends SD by introducing dynamic actors that has conditional inputs or output ports. hese actors satisfies the following properties: he number of tokens consumed by an input port, or produced by an output port per firing is a two-valued function of the value of a oolean token that is recieved by another input port (the control port) of the ENLED ENLED SWIH SELE IRED IRED SWIH SELE ENLED ENLED SWIH SELE IRED IRED igure 1. Structure and semantics of SWIH and SE- LE actors. SWIH SELE same actor. Such an input port is called a conditional port. One of the two values of the function is zero. he control port could be an output where the control token s value annouces whether there are data on the conditional port. ontrol ports are never conditional ports, and always consume exactly one oolean token per firing. he canonical examples of such actors are SWIH and SELE. he structure and semantics are of the two actors are illustrated in igure 1. 2.2 Petri nets Petri net is a 5-tuple P N = (P,,, W, M 0 ), where P is a finite set of places, is a finite set of transitions; (P ) ( P ) is a set of arcs; W : {1, 2,...} is a weight function; M 0 : P {0, 1,...} is the initial marking. Given a transition t i and a place p j, if (t i, p j ), t i is called an input transition of p j, and p j is called an output place of t i. Similarly if (p j, t i ), t i is called an output transition of p j, and p j is called an input place of t i. he set of input transitions of p j is denoted by p j. he set of output transitions of p j is denoted by p j. he set of input places of t i is denoted by t i. he set of output places of t i is denoted by t i. marking is a mapping M : P {0, 1,...}. It represents the state of a PN. transition t i is called enabled if p j t i, M(p j ) W (p j, t i ). transition may or may not fire whenever it is enabled. firing of an enabled transition t i at marking M is denoted by M[t i > M, p j t i, M (p j ) = M(p j ) W (p j, t i ), p k t i, M (p k ) = M(p k ) + W (t i, p k ). marking M n is said to be reachable from the inital marking M 0 if there exists a firing sequence β = t i t j...t k such that M 0 [t i > M 1 [t j > M 2...[t k > M n or simply M 0 [β > M n. he incidence matrix = [a ij ] is a P matrix, where a ij = (t i, p j ) (p j, t i ). 2

vector x N is called a -invariant if x = 0. -invariant x is said to be minimal if there exists no other -invariant x x with x x. 2.3 Quasi-static schedules quasi-static schedule or bounded memory schedule is a finite list of guarded firings where: he system executing the schedule returns to its initial state, regardless of the outcome of the conditions or choices. iring rules are satisfied at every point in the schedule. SWIH p pa p pa SELE igure 2. ransformation of SWIH and SELE actor to PN. p pa p pa bounded-length schedule is a quasi-static schedule where the number of firings required to return the system to its initial state is bounded by a constant. If each firing is associated with execution time, bounded-length schedule can be used to estimate if a hard deadline can be met in real-time applications. Generating bounded-length schedule starts with finding the cyclic firing sequences that the system state after the firings is the same as before the firings. Such cycles must exists for all possible outcomes of conditions or choices. 3 ransformation Scheme It is known SD is equivalent to a special case of PN, maked graph. More specifically, there is a transformation scheme that one-to-one maps actors and acrs of a SD to transitions and places of a PN. So we restrict our attension to the following D actor: SWIH, SELE, and oolean stream generators. 3.1 SWIH and SELE actors he transformations of SWIH and SELE actors are shown in igure 2. If there is a true oolean token present at the control port of the actors in a D, a token will be present in p of the transformed PN. or the SWIH actor, if transition, transformed from the actor, is fired, transition or is enabled dependending on whether there is a token in p or p, respectively. Note that p and p can not both have tokens, because it corresponds to possible out of order execution of the orignal D. It is avoided by introducing a synchronization mechanism discussed later. Presence of a token in place p a or p a is used to indicate that the D actor finishes execution. hey can not both have tokens because of the synchronization mechanism. oolean stream p pa p pa igure 3. onversion of oolean stream actor to PN. 3.2 oolean control stream generators he transformation of oolean control stream generator is shown in igure 3. he core part is a synchronization and delivery machinary. It is triggered by the transition, transformed from the actor, and non-deterministically chooses to fire transition or, which corresponds to the oolean generator generate a true or false token. he token will be routed to the corresponding place p or p, respectively. In order to ensure the ordering of tokens, the machinary can continue to generate new tokensonly when it recieves acknoledgement from the controlled actors. he acknolegement is repsented by the presence of a token in place p a or p a. 3.3 Initial oolean tokens It can be seen from the above transformation, we preserve the ordering of tokens by synchronization, i.e. at most one control token is present at the control port. So if there are more than one initial oolean tokens in a D, the above transformation would not be able to generate a PN. However, it is possible that the initial oolean tokens can be consumed by a number of firings of actors. hat is, a D with initial oolean tokens after a finite number of 1 3

3.5 Schedulability SELE SWIH SELE SWIH igure 4. ransformation of D by use of a preamble. firings reaches a state where there are no or one oolean token at its control ports. or example, the left D in igure 4 is transformed to the right D by firing actor and SELE. he finite firing sequence is called a preamble. y use of a preamble, we redefined the initial state of a system. However, if the PN transformed from the new D has a bounded-memory schedule, we can construct the schedule for the orignal D by adding the preamble as a prefix of the schedule. he rationale of imposing bounds on oolean control arcs also comes from the fact that each firing of SWIH or SELE actor will consume exactly one oolean token. So accumulating oolean tokens at control ports will not help enabling actors. 3.4 ansformation lgorithm lgorithm 1 ransformation lgorithm if (initial oolean tokens > 1) then transform D by preamble; end if transform SD actors; transform SWIH actors; transform SELE actors; transform oolean actors; handeling initial tokens; irst, the D is checked with the number of initial oolean tokens. If it is more than one, a preamble-basedtransformation is invoked. he transformation procedure starts with replacing SD actors to transitions, and replacing arcs with places. he SWIH, SELE and oolean actors are transformed to the PN structures mentioned above. inally, the initial Proposition 1 D has a bounded length schedule, if and only if the transformed PN has a bounded length schedule. Sketch of the proof: Leftarrow, basde on the above transformation it can be shown the transformed PN is equivalent to a D with bounds of the control arcs to be exact one. Hence every firing sequence of the PN corresponds to a firing sequence of the D, but not vice versa. In other words, the PN contains firing sequences which are a subset of firing sequences of the D. hus, the same schedule generated for the PN can be applied to the D. Rightarrow, the necessary and sufficient condition for a D to have a bounded-length schedule is: irst, it must have complete cycles for all possible outcomes of conditions and choices. Second, for all possible oolean sequences, it is possible to construct a corresponding acyclic precedence graph. We can show that the first condition is equivalent to existence of -invariants for all possible choices. he second condition decomposes the D to a regular SD. he PN can corrspondingly decompose to marked graph components. It is easy to check the equivalence of a SD to the corresponding marked graph. Proposition 2 D has a bounded memory schedule if the transformed PN has a bounded memory schedule. Sketch of the proof: the PN contains firing sequences which are a subset of firing sequences of the D. hus, the same schedule generated for the PN can be applied to the D. 1 3.6 onsistence strongly consistent D is one where there exists a solution to the balance equation regardless of possible values of the symbolic variables. weakly consistent D is one where there exist a solution to the balance equation only for some values of the symbolic variables. Weakly consistence implies the correlation between different conditions enforced by the complete cycles. or example, if two symbolic variables must have the same value so that the balance equation have a solution. It means the two conditions are either the same or opposite in a complete cycle. In a transformed PN, it means for every -invariant x, if the true transition of the first choice is contained in x, the true or false transition of the second choice is contained in x. Definition 1 (Pairwise transition dependency) Given two transitions t i, t j of a Petri net, t i is said to be dependent on t j if t j appears in every (minimal) -invariant containing t i, i.e., R 1 = {(t i, t j ) 2 x χ, t i x t j x }. 4

or example, the D in igure 5 is weakly consistent. he symbolic variables associated with the SWIH and SELE actor must have the same value so that the balance equation has a solution. he transformed PN, there are two minimal -invariants. One minimal -invariant contains both transitions, and the other one contains both transitions. 4 onclusion and future research directions his paper presents a transformation scheme from D to PN that has the following properties. D has a bounded length schedule, if and only if the transformed Petri net has a bounded length schedule. D has a bounded memory schedule if the transformed PN has a bounded memory schedule. However, whether the schedulability of the D implies the schedulability of the transformed PN or not remains an open question. uture research directions includes exploration of other transformation schemes, and comparing the schedulability of the D and PN. the 23rd International onference on pplications and heory of Petri Nets, pages 80 100, 2002. [3].. R. Hoare. ommunicating Sequential Processes. International Series in omputer Science. Prentice- Hall, 1985. [4] G. Kahn. he semantics of a simple language for parallel programming. In Information processing, pages 471 475, ug 1974. [5] G. Kahn and D.. MacQueen. oroutines and networks of parallel processes. In Information processing, pages 993 998, ug 1977. [6] E.. Lee and D. G. Messerschmitt. Static scheduling of synchronous data flow graphs for digital signal processing. IEEE ransactions on omputers, Jan. 1987. [7]. Murata. Petri nets: properties, analysis, and applications. Proceedings of the IEEE, 77(4):541 580, pr. 1989. References [1] J.. uck. Scheduling dynamic dataflow graphs with bounded memory using the token flow model. PhD thesis, University of alifornia, erkeley, 1993. [2] J. ortadella,. Kondratyev, L. Lavagno,. Passerone, and Y. Watanabe. Quasi-static scheduling of independent tasks for reactive systems. In Proceedings of E E p2 p1 p2 p1 SWIH SELE pa1 pa2 pa2 pa1 D D igure 5. onversion of if-then-else D to PN. 5