Message Scheduling in Time ‐ Triggered Protocols l Zden ě k Hanzálek Thanks to: P. Š ů cha, P. Jur č ík, P. Burget Czech Technical University in Prague Czech Technical University in Prague
Contents Contents 1 P 1. Project Scheduling with Temporal Constraints j t S h d li ith T l C t i t 2. Profinet IO IRT Message Scheduling – Formulation F l i – Use of time constraints – Experiments 3. Energy efficient scheduling for cluster ‐ tree Wireless Sensor Networks – Formulation of the cyclic scheduling problem – Experiments 4. Conclusions Profinet IO IRT Message Scheduling
Project Scheduling with Temporal Constraints h l
Original Motivation g ( ) = ≤ + + for m 1 ; m M ; m / * for each sample * / { T T 2 ( 1 ) η = η − γ − ⋅ ψ − f ( k ) ( k ) ( k 1 ) ( k 1 ) − − m m 1 m m 1 T 3 = γ − ⋅ η f ( k 1 ) ( k ) − − m 1 m 1 T T T T 5 5 4 4 ( ) ψ = ψ − − γ − ⋅ η b ( k ) ( k 1 ) ( k 1 ) ( k ) − − m m 1 m m 1 T High ‐ level synthesis 6 • = γ ⋅ ψ b ( k ) ( k ) − − m 1 m 1 T T 8 7 ( ) α = α − κ − ⋅ ψ ( k 1 ) ( k ) − m m 1 – algorithm description by an oriented graph T T 10 ( 9 ) γ = γ − + − ⋅ η f f n ( k ) ( k 1 ) b ( k 1 ) ( k ) − m m m 1 m T T T T 13 11 14 12 ( ( )) ( ) = ν + λ ⋅ − + ⋅ η F ( k ) F ( k 1 ) f ( k ) – off ‐ line scheduling ff li h d li − − − m 1 m 1 m 1 T T T T 17 15 18 16 ( ( )) ( ) = ν + λ ⋅ − + ⋅ ψ B ( k ) B ( k 1 ) b ( k ) − − − m 1 m 1 m 1 T 19 – automatic code generation = f f / F ( k ) − − m 1 m 1 T 20 = b ( k ) b / B ( k ) − − m 1 m 1 • Specific HW architecture – FPGAs T T 22 21 ( ) γ = γ − + ⋅ ψ b b ( k ) ( k 1 ) f ( k ) − m m m 1 m T T 24 23 ( ( ) ) κ = κ − + ⋅ α ( k ) ( k 1 ) b ( k ) − – high degree of parallelism m m m 1 T T 26 25 ( ) γ = γ − ⋅ ( k ) ( k ) b ( k ) b − − m m 1 m 1 } – dedicated units (e.g. floating point) – pipelining ?? – shared memory – reconfiguration • Optimality ‐ objective is to find a feasible schedule Optimality objective is to find a feasible schedule with minimal C max – Branch&Bound algorithm – ILP formulation – ILP formulation
Project Scheduling with Temporal Constraints Temporal constrains are sometimes called generalized precedence constraints or positive and negative time lags or relative time windows . s i + l ij ≤ s j + l ≤ • start times of two tasks are mutually constrained by arc length: Problem representation by oriented graph G Problem representation by oriented graph G T 4 • node ‐ instruction ‐ task T i with processing time p i 4 • forward arc /positive sign/ ‐ express precedence delay , 3 4 i including pipelining or processing time on unconstrained l di i li i i i i d T 1 T 3 T 5 1 4 resources 1 2 5 2 4 • backward arc /negative sign/ ‐ express relative deadline , T 2 the latest start time s j of T j relative to the start time s j of T j 3 • non ‐ preemptive off ‐ line scheduling ‐ 10 Optimal feasible schedule on one processor: l 51 = ‐ 10 T 1 T 3 T 2 T 4 T 5 t 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Problem Complexity Problem Complexity Decision version of our problem (decide existence of feasible Decision version of our problem (decide existence of feasible schedule) is NP-complete , since it is P-reducible from Bratley’s problem (which is P-reducible from 3-PARTITION problem). Instance of Bratley’s problem ⇒ instance of our problem T 1 p 1 r 1 ‐ (d 1 ‐ p 1 ) T 0 Independent tasks T 2 r 2 0 0 2 1| r j ,d j |C max p 2 P-reducible ‐ (d 2 ‐ p 2 ) r =[r 1 ,r 2 ,…,r n ] r n n p =[p 1 ,p 2 ,…,p n ] ‐ (d n ‐ p n ) T n d =[d 1 ,d 2 ,…,d n ] p n p n
Search space of systems with time constraints time constraints (?,?,?,?,?) (0 ? ? ? ?) (0,?,?,?,?) (0,2,?,?,?) (0,?,1,?,?) (0,?,?,3,?) (0 2 5 (0,2,5,?,?) ) (0,2,?,5,?) (0 2 5 )(0,3,1,?,?) (0 3 1 ) (0,?,1,3,?) (0 1 3 ) (0,7,?,3,?) (0,?,7,3,?) (0,2,9,5,?) (0,7,1,3,?) (0,7,10,3,?) (0,9,7,3,?) (0,2,5,7,?) (0,3,1,6,?) (0,2,5,7,11) (0,2,9,5,13) (0,3,1,6,10) (0,7,1,3,11) (0,7,10,3,14) (0,9,7,3,13) Complexity of the system optimization is the same as the one of the Complexity of the system optimization is the same as the one of the system verification. In practice: sub-optimal solution , found in a part of the search tree (e.g. , p ( g p p by heuristic algorithm) has practical value , but partial verification (i.e the one which does not consider all possible behaviors) has none. It is easier to synthesize the time-constrained system than to leave the freedom to the designer and consequently verify its time properties.
Modeling by temporal constraints Temporal constraints with positive l ij a) l ij = p i • • “normal” precedence relations normal precedence relations p i • execution of the next task may start after execution of the previous task b1) l > p b1) l ij > p i execution of the next task may start • some time after completion of the previous task p i • example of a dry operation performed in sufficiently large space performed in sufficiently large space
Temporal constraints with positive l ij b2) another example with l ij > p i ‐ pipelined ALU • We assume the processing time to be equal in all stages • • Stage 1 reads new operands Stage 1 reads new operands each p 1 • Result is available l 1f tics later f • Stages 2 and 3 are not modeled since we have enough of these resources enough of these resources and they are synchronized with stage 1 p 1
Temporal constraints with positive l ij c) 0 < l ij < p i Partial results of the previous task may be used to start execution of the Partial results of the previous task may be used to start execution of the following task. E.g. cut ‐ through mechanism , where the switch starts transmission on the output port earlier than it receives complete message on the input port g p p • Resources are communication links • l ab presents transmission (of one bit) through the switch one bit) through the switch • Different parts of the same message are transmitted by several communication links l i ti li k at the same time p a
Temporal constraints with zero or negative l ij d) l ij = 0 • Task T i has to start earlier or at the same time as T same time as T j p i e) l ij < 0 • Task T i has to start earlier or at the most | l | later than T most | l ij | later than T j • It looses the sense of “normal ” precedence relation, since T j can j precede T i • It presents relative deadline of T i with respect to start time of T with respect to start time of T j p i
Problem Formulation by ILP Problem Formulation by ILP processor constraints ( ( n 2 ‐ n )/ 2 decision variables x ij ) … “big M” ∀ ∈ < ≤ − + ⋅ ≤ − i , j 1 , n , i j , p s s x C C p j i j ij i C C a) when T i precedes T j ( x ij = 1) T i T j ≥ ≥ + + s s p s i s j j i i t C b) ) when T i succeeds T j ( x ij = 0) j ( ij ) i ≥ + s s p T j T i i j j s i t s j
Processor constraints (cont ) – XOR relation Processor constraints (cont.) – XOR relation Example: T and T without precedence constraints T i and T j without precedence constraints p i = 2 , p j = 3, upper margin of C max = 8
ILP program – for m dedicated processors ILP program for m dedicated processors objective function ‐ min i C C minimizes makespan max subject to : precedence constraint ‐ − ≥ ≥ s s s s l l j i ij restriction given by graph G ≤ − + ⋅ ≤ − p s s C x C p j i j ij i + ≤ s s p p C C processor constraints processor constraints ‐ i i i i max max • at maximum one task is where : executed at a given time ∈ − ∈ ∈ s 0 , C 1 , x 0 , 1 , C 0 , C i ij j max • this constraint exists for • this constraint exists for s , x are integers. each couple of tasks i ij allocated to the same processor
PS|temp|C max ‐ Related Work Resource Constraint Project Scheduling with Time Constraints • [B.Roy 59] – Project planning – Metra Potencial Method – introduction of positive and negative time lags • • [Brucker P Drexl A Mohring R Neumann K Pesch E 99] Resource [Brucker, P., Drexl, A., Mohring, R., Neumann, K., Pesch, E., 99] Resource ‐ constrained project scheduling: Notation, classification , models, and methods [K.Neumann, Ch.Schwindt, J. Zimmermann] – Project Scheduling with [K Neumann Ch Schwindt J Zimmermann] Project Scheduling with • • Time Windows and Scarce Resources [W.Herroelen, B.D. Reyck, E.Demeulemeester] ‐ Resource ‐ constrained • project scheduling : A survey of recent developments j t h d li A f t d l t [B.D. deDinechin] ‐ Simplex scheduling: More than lifetime ‐ sensitive • instruction scheduling [R.Alur, D.Dill] ‐ A theory of timed automata . • • [K.G. Larsen KG, P. Petterson P, W. Yi] ‐ UPPAAL in a nutshell. – guards and time invariants represent positive and negative time lags g p p g g – Difference Bound Matrices (DBM) ‐ symbolic representation of states by clock zones
PS|temp|C max
Recommend
More recommend