Performance Analysis, Scheduling and Synthesis of Embedded Systems - - PowerPoint PPT Presentation

performance analysis scheduling and synthesis of embedded
SMART_READER_LITE
LIVE PREVIEW

Performance Analysis, Scheduling and Synthesis of Embedded Systems - - PowerPoint PPT Presentation

Performance Analysis, Scheduling and Synthesis of Embedded Systems Kim G. Larsen CISS Aalborg University DENMARK CISS in Numbers National ICT Comptetence Center 2002: MDKK Ministry 31,5 MDKK North Jutland 8,5 MDKK Aalborg City


slide-1
SLIDE 1

Performance Analysis, Scheduling and Synthesis

  • f Embedded Systems

Kim G. Larsen CISS – Aalborg University DENMARK

slide-2
SLIDE 2

CDC Final Workshop CDC Final Workshop, Tallinn, J , Tallinn, Jan, 2008 n, 2008 Ki Kim L Larsen [ [2]

CISS in Numbers

  • National ICT Comptetence Center

2002: 31,5 MDKK Ministry 8,5 MDKK North Jutland 7,5 MDKK Aalborg City 16,00 MDKK Companies 16,00 MDKK AAU

  • 45 projects
  • 20 CISS employees
  • 25 CISS associated

researcher at 3 different research groups at AAU!

  • >20 industrial PhDs
slide-3
SLIDE 3

CDC Final Workshop CDC Final Workshop, Tallinn, J , Tallinn, Jan, 2008 n, 2008 Ki Kim L Larsen [ [3]

European Projects

ARTIST2 (NoE FP6)

coordinator for Testing & Verification Cluster

ARTIST Design (NoE FP7)

kick-off meeting end of January co-coordinator of Modeling and Validation w Tom Henzinger)

  • Other new STREPs (FP7)

Quasimodo, Multiform

slide-4
SLIDE 4

CDC Final Workshop CDC Final Workshop, Tallinn, J , Tallinn, Jan, 2008 n, 2008 Ki Kim L Larsen [ [4]

Motivation – MPSoC

CELL processor

slide-5
SLIDE 5

CDC Final Workshop CDC Final Workshop, Tallinn, J , Tallinn, Jan, 2008 n, 2008 Ki Kim L Larsen [ [5]

Scheduling… in ES

Tasks:

Computation times Deadlines Dependencies Arrival patterns uncertainties

Resources

Execution platform PE, Memory Networks Drivers uncertainties

Scheduling Principles (OS)

EDF, FPS, RMS, DVS, ..

slide-6
SLIDE 6

CDC Final Workshop CDC Final Workshop, Tallinn, J , Tallinn, Jan, 2008 n, 2008 Ki Kim L Larsen [ [6]

Issues

Schedulability Analysis

Verify that given SP ensures deadlines.

Performance Evaluation

Estimate resources (e.g. energy) required by given SP.

Scheduling & Synthesis

Synthesize (optimal) SP ensuring given objective. Scheduling: SP controls everything (including ex.time). Synthesis: scheduling under uncertainties (e.g. execution time, availability of resources). Tasks SP Res.

slide-7
SLIDE 7

CDC Final Workshop CDC Final Workshop, Tallinn, J , Tallinn, Jan, 2008 n, 2008 Ki Kim L Larsen [ [7]

Approach – TA

Schedulability Analysis

Verify that given SP ensures deadlines.

Performance Evaluation

Estimate resources (e.g. energy) required by given SP.

Scheduling & Synthesis

Synthesize (optimal) SP ensuring given objective. Scheduling: SP controls everything (including ex.time). Synthesis: scheduling under uncertainties (e.g. execution time, availability of resources). Tasks SP Res.

CLASSI C CLASSI C CLASSI C

TI GA TI GA TI GA

CORA CORA CORA

TALK: What can we do? What can we do efficiently? What can not be done? What would we like to do? TALK TALK: What can we do? What can we do efficiently? What can not be done? What would we like to do?

slide-8
SLIDE 8

CDC Final Workshop CDC Final Workshop, Tallinn, J , Tallinn, Jan, 2008 n, 2008 Ki Kim L Larsen [ [8]

The UPPAAL Team

@UPPsala

Wang Yi Paul Pettersson John Håkansson Anders Hessel Pavel Krcal Leonid Mokrushin Shi Xiaochun

@AALborg

Kim G Larsen Gerd Behrman Arne Skou Brian Nielsen Alexandre David Jacob I. Rasmussen Marius Mikucionis Thomas Chatain

@Elsewhere

  • Emmanuel Fleury, Didier Lime, Johan Bengtsson, Fredrik Larsson, Kåre J Kristoffersen,

Tobias Amnell, Thomas Hune, Oliver Möller, Elena Fersman, Carsten Weise, David Griffioen, Ansgar Fehnker, Frits Vandraager, Theo Ruys, Pedro D’Argenio, J-P Katoen, Jan Tretmans, Judi Romijn, Ed Brinksma, Martijn Hendriks, Klaus Havelund, Franck Cassez, Magnus Lindahl, Francois Laroussinie, Patricia Bouyer, Augusto Burgueno, H. Bowmann, D. Latella, M. Massink, G. Faconti, Kristina Lundqvist, Lars Asplund, Justin Pearson...

slide-9
SLIDE 9

CDC Final Workshop CDC Final Workshop, Tallinn, J , Tallinn, Jan, 2008 n, 2008 Ki Kim L Larsen [ [9]

“Impact”

Google:

UPPAAL: 134.000 SPIN Verifier: 242.000 nuSMV: 57.700 > 2.900 Google Scholar Citations (Rhapsody/Esterel < 5.000)

UPPAAL downloads (total)

200000 400000 600000 800000 1000000 1200000 9907 0001 0007 0101 0107 0201 0207 0301 0307 0401 0407 0501 0507 0601 0607 0701 0707 Date #

slide-10
SLIDE 10

CDC Final Workshop CDC Final Workshop, Tallinn, J , Tallinn, Jan, 2008 n, 2008 Ki Kim L Larsen [ [10]

Timed Automata

Synchronization Guard Invariant Reset

[ Alur & Dill’89]

Resource Sem antics: ( Idle , x= 0 ) ( Idle , x= 2.5) d(2.5) ( InUse , x= 0 ) use? ( InUse , x= 5) d(5) ( Idle , x= 5) done! ( Idle , x= 8) d(3) ( InUse , x= 0 ) use?

slide-11
SLIDE 11

CDC Final Workshop CDC Final Workshop, Tallinn, J , Tallinn, Jan, 2008 n, 2008 Ki Kim L Larsen [ [11]

Composition

Resource Task Shared variable Synchronization Sem antics: ( Idle , Init , B= 0, x= 0) ( Idle , Init , B= 0 , x= 3.1415 ) d(3.1415) ( InUse , Using , B= 6, x= 0 ) use ( InUse , Using , B= 6, x= 6 ) d(6) ( Idle , Done , B= 6 , x= 6 ) done

slide-12
SLIDE 12

CDC Final Workshop CDC Final Workshop, Tallinn, J , Tallinn, Jan, 2008 n, 2008 Ki Kim L Larsen [ [12]

Task Graph Scheduling

Optimal Static Task Scheduling

  • Task P={P1,.., Pm}
  • Machines M={M1,..,Mn}
  • Duration Δ : (P×M) → N∞
  • < : p.o. on P (pred.)
  • A task can be executed only if

all predecessors have completed

  • Each machine can process at

most one task at a time

  • Task cannot be preempted.
  • Compute schedule with

minimum completion-time!

P2 P1 P6 P3 P4 P7 P5

1 6 ,1 0 2 ,3 2 ,3 6 ,6 1 0 ,1 6 2 ,2 8 ,2

M = { M1,M2}

slide-13
SLIDE 13

CDC Final Workshop CDC Final Workshop, Tallinn, J , Tallinn, Jan, 2008 n, 2008 Ki Kim L Larsen [ [13]

Task Graph Scheduling

Optimal Static Task Scheduling

  • Task P={P1,.., Pm}
  • Machines M={M1,..,Mn}
  • Duration Δ : (P×M) → N∞
  • < : p.o. on P (pred.)

P2 P1 P6 P3 P4 P7 P5

1 6 ,1 0 2 ,3 2 ,3 6 ,6 1 0 ,1 6 2 ,2 8 ,2

M = { M1,M2}

E<> (Task1.End and … and Task7.End)

slide-14
SLIDE 14

CDC Final Workshop CDC Final Workshop, Tallinn, J , Tallinn, Jan, 2008 n, 2008 Ki Kim L Larsen [ [14]

Experimental Results

Abdeddaïm, Kerbaa, Maler

Symbolic A* Brand-&-Bound 60 sec

slide-15
SLIDE 15

CDC Final Workshop CDC Final Workshop, Tallinn, J , Tallinn, Jan, 2008 n, 2008 Ki Kim L Larsen [ [15]

Optimal Task Graph Scheduling

Power-Optimality

  • Energy-rates:

C : M → N

  • Compute schedule with

minimum completion-cost!

P2 P1 P6 P3 P4 P7 P5

1 6 ,1 0 2 ,3 2 ,3 6 ,6 1 0 ,1 6 2 ,2 8 ,2

4 W 3 W

slide-16
SLIDE 16

CDC Final Workshop CDC Final Workshop, Tallinn, J , Tallinn, Jan, 2008 n, 2008 Ki Kim L Larsen [ [16]

Priced Timed Automata

Alur, Torre, Pappas (HSCC’01) Behrmann, Fehnker, et all (HSCC’01)

l1 l2 l3 x: = 0 c+ = 1 x · 2 3 · y c+ = 4 c’= 4 c’= 2

0 · y · 4 y · 4 x: = 0

Timed Automata + COST variable

cost rate cost update

slide-17
SLIDE 17

CDC Final Workshop CDC Final Workshop, Tallinn, J , Tallinn, Jan, 2008 n, 2008 Ki Kim L Larsen [ [17]

Priced Timed Automata

Alur, Torre, Pappas (HSCC’01) Behrmann, Fehnker, et all (HSCC’01)

l1 l2 l3 x: = 0 c+ = 1 x · 2 3 · y c+ = 4 c’= 4 c’= 2

0 · y · 4 y · 4 x: = 0

cost rate cost update

(l1,x= y= 0) (l1,x= y= 3) (l2,x= 0,y= 3) (l3,_,_)

ε(3) 12 1 4

∑ c= 1 7

TRACES

Timed Automata + COST variable

slide-18
SLIDE 18

CDC Final Workshop CDC Final Workshop, Tallinn, J , Tallinn, Jan, 2008 n, 2008 Ki Kim L Larsen [ [18]

TRACES

Priced Timed Automata

Alur, Torre, Pappas (HSCC’01) Behrmann, Fehnker, et all (HSCC’01)

l1 l2 l3 x: = 0 c+ = 1 x · 2 3 · y c+ = 4 c’= 4 c’= 2

0 · y · 4 y · 4 x: = 0

cost rate cost update

(l1,x= y= 0) (l1,x= y= 3) (l2,x= 0,y= 3) (l3,_,_) (l1,x= y= 0) (l1,x= y= 2.5) (l2,x= 0,y= 2.5) (l2,x= 0.5,y= 3) (l3,_,_) (l1,x= y= 0) (l2,x= 0,y= 0) (l2,x= 3,y= 3) (l2,x= 0,y= 3) (l3,_,_)

ε(3) ε(2.5) ε(.5) ε(3) 12 1 4 10 1 1 4 1 6 4

∑ c= 1 7 ∑ c= 1 6 ∑ c= 1 1

P r

  • b

l e m :

F i n d t h e m i n i m u m ( m a x i m u m ) c

  • s

t

  • f

r e a c h i n g l

  • c

a t i

  • n

l

3

P r

  • b

l e m :

F i n d t h e m i n i m u m ( m a x i m u m ) c

  • s

t

  • f

r e a c h i n g l

  • c

a t i

  • n

l

3

Efficient Implementation: CAV’0 1 and TACAS’0 4 Efficient Implementation: CAV’0 1 and TACAS’0 4

Timed Automata + COST variable

Competitive with MILP and commercial tool (Axxon)

slide-19
SLIDE 19

CDC Final Workshop CDC Final Workshop, Tallinn, J , Tallinn, Jan, 2008 n, 2008 Ki Kim L Larsen [ [19]

Optimal Infinite Scheduling

Maximize throughput: i.e. maximize Reward / Time in the long run!

slide-20
SLIDE 20

CDC Final Workshop CDC Final Workshop, Tallinn, J , Tallinn, Jan, 2008 n, 2008 Ki Kim L Larsen [ [20]

Optimal Infinite Scheduling

Minimize Energy Consumption: i.e. minimize Cost / Time in the long run

slide-21
SLIDE 21

CDC Final Workshop CDC Final Workshop, Tallinn, J , Tallinn, Jan, 2008 n, 2008 Ki Kim L Larsen [ [21]

Optimal Infinite Scheduling

Maximize throughput: i.e. maximize Reward / Cost in the long run

slide-22
SLIDE 22

CDC Final Workshop CDC Final Workshop, Tallinn, J , Tallinn, Jan, 2008 n, 2008 Ki Kim L Larsen [ [22]

Cost Optimal Scheduling =

Optimal Infinite Path

c1 c2 c3 cn r1 r2 r3 rn

σ

Value of path σ: val(σ) = limn→∞ cn/rn Optimal Schedule σ* : val(σ* ) = infσ val(σ)

Accumulated cost Accumulated reward

¬(Task0.Err or Task1.Err or …)

slide-23
SLIDE 23

CDC Final Workshop CDC Final Workshop, Tallinn, J , Tallinn, Jan, 2008 n, 2008 Ki Kim L Larsen [ [23]

Cost Optimal Scheduling =

Optimal Infinite Path

c1 c2 c3 cn r1 r2 r3 rn

σ

Value of path σ: val(σ) = limn→∞ cn/rn Optimal Schedule σ* : val(σ* ) = infσ val(σ)

Accumulated cost Accumulated reward

¬(Task0.Err or Task1.Err or …)

THEOREM: σ* is computable THEOREM: σ* is computable

Bouyer, Brinksma, Larsen HSCC’04

slide-24
SLIDE 24

CDC Final Workshop CDC Final Workshop, Tallinn, J , Tallinn, Jan, 2008 n, 2008 Ki Kim L Larsen [ [25]

Multiple Objective Scheduling

P2 P1 P6 P3 P4 P7 P5

1 6 ,1 0 2 ,3 2 ,3 6 ,6 1 0 ,1 6 2 ,2 8 ,2

4 W 3 W

cost1’==4 cost2’==3

3 W

slide-25
SLIDE 25

CDC Final Workshop CDC Final Workshop, Tallinn, J , Tallinn, Jan, 2008 n, 2008 Ki Kim L Larsen [ [26]

Multiple Objective Scheduling

P2 P1 P6 P3 P4 P7 P5

1 6 ,1 0 2 ,3 2 ,3 6 ,6 1 0 ,1 6 2 ,2 8 ,2

4 W 3 W

cost1’==4 cost2’==3 cost1 cost2

Pareto Frontier

T h e P a r e t

  • F

r

  • n

t i e r f

  • r

R e a c h a b i l i t y i n M u l t i P r i c e d T i m e d A u t

  • m

a t a i s c

  • m

p u t a b l e

[Illum, Larsen FoSSaCS05]

slide-26
SLIDE 26

CDC Final Workshop CDC Final Workshop, Tallinn, J , Tallinn, Jan, 2008 n, 2008 Ki Kim L Larsen [ [30]

Synthesis =

Scheduling under uncertainty

Uncontrollable Controllable

TIMED GAMES TIMED GAMES TIMED GAMES

slide-27
SLIDE 27

CDC Final Workshop CDC Final Workshop, Tallinn, J , Tallinn, Jan, 2008 n, 2008 Ki Kim L Larsen [ [31]

UPPAAL Tiga

Synthesis of winning strategies for TIMED GAMES

CONCUR05, CAV07, FORMATS07 Efficient on-the-fly generation

  • f winning strategies for

safety & liveness objectives

slide-28
SLIDE 28

CDC Final Workshop CDC Final Workshop, Tallinn, J , Tallinn, Jan, 2008 n, 2008 Ki Kim L Larsen [ [32]

Optimal Synthesis =

Priced Timed Games

Uncontrollable Controllable Optimal winning strategies ??

, cost’=4 , cost’=3

slide-29
SLIDE 29

CDC Final Workshop CDC Final Workshop, Tallinn, J , Tallinn, Jan, 2008 n, 2008 Ki Kim L Larsen [ [33]

Priced Timed Games

Price Optimal Control (reachability):

Acyclic PTA [LTMM02] Bounded length [ABM04] Strong non-zeno cost-behaviour [BCFL04] Undecidable with 3 clocks or more [BBR05, BBM06] Decidable for PTGs with 1 clock [BLMR06]

Priced Timed Safety Games

Conjectured to be undecidable in general.

slide-30
SLIDE 30

CDC Final Workshop CDC Final Workshop, Tallinn, J , Tallinn, Jan, n, 2008ESWeek Foundati 2008ESWeek Foundations o

  • ns of Compo

Component- ent- based Desi based Design, Sep 30, 2007 n, Sep 30, 2007 Ki Kim G L G Larsen en [36 [36] DTU Aske Brekling, Jens Ellebæk, Kristian S. Knudsen, Jan Madsen, Michael R. Hansen, Jacob I. Rasmussen

Handling realistic applications?

[Application from Marcus Schmitz, TU Linkoping]

Smart phone:

slide-31
SLIDE 31

CDC Final Workshop CDC Final Workshop, Tallinn, J , Tallinn, Jan, n, 2008ESWeek Foundati 2008ESWeek Foundations o

  • ns of Compo

Component- ent- based Desi based Design, Sep 30, 2007 n, Sep 30, 2007 Ki Kim G L G Larsen en [37 [37]

Timed Automata for a task

slide-32
SLIDE 32

CDC Final Workshop CDC Final Workshop, Tallinn, J , Tallinn, Jan, n, 2008ESWeek Foundati 2008ESWeek Foundations o

  • ns of Compo

Component- ent- based Desi based Design, Sep 30, 2007 n, Sep 30, 2007 Ki Kim G L G Larsen en [38 [38]

Smart phone

Tasks: 114 Deadlines: [0.02: 0.5] sec Execution: [52 : 266.687] cycles Platform:

6 processors, 25 MHz 1 bus

Verified in 1.5 hours!

slide-33
SLIDE 33

CDC Final Workshop CDC Final Workshop, Tallinn, J , Tallinn, Jan, n, 2008ESWeek Foundati 2008ESWeek Foundations o

  • ns of Compo

Component- ent- based Desi based Design, Sep 30, 2007 n, Sep 30, 2007 Ki Kim G L G Larsen en [39 [39]

Optimal Combinations

1clock 2 clocks 3 clocks 1player 2players time 1 cost mult cost Reach Safety F Obs P Obs

slide-34
SLIDE 34

CDC Final Workshop CDC Final Workshop, Tallinn, J , Tallinn, Jan, n, 2008ESWeek Foundati 2008ESWeek Foundations o

  • ns of Compo

Component- ent- based Desi based Design, Sep 30, 2007 n, Sep 30, 2007 Ki Kim G L G Larsen en [40 [40]

Optimal Combinations

1clock 2 clocks 3 clocks 1player 2players time 1 cost mult cost Reach Safety F Obs P Obs

TI GA TI GA TI GA

slide-35
SLIDE 35

CDC Final Workshop CDC Final Workshop, Tallinn, J , Tallinn, Jan, n, 2008ESWeek Foundati 2008ESWeek Foundations o

  • ns of Compo

Component- ent- based Desi based Design, Sep 30, 2007 n, Sep 30, 2007 Ki Kim G L G Larsen en [41 [41]

Optimal Combinations

1clock 2 clocks 3 clocks 1player 2players time 1 cost mult cost Reach Safety F Obs P Obs

CORA CORA CORA

slide-36
SLIDE 36

CDC Final Workshop CDC Final Workshop, Tallinn, J , Tallinn, Jan, n, 2008ESWeek Foundati 2008ESWeek Foundations o

  • ns of Compo

Component- ent- based Desi based Design, Sep 30, 2007 n, Sep 30, 2007 Ki Kim G L G Larsen en [42 [42]

Optimal Combinations

1clock 2 clocks 3 clocks 1player 2players time 1 cost mult cost Reach Safety F Obs P Obs

slide-37
SLIDE 37

CDC Final Workshop CDC Final Workshop, Tallinn, J , Tallinn, Jan, n, 2008ESWeek Foundati 2008ESWeek Foundations o

  • ns of Compo

Component- ent- based Desi based Design, Sep 30, 2007 n, Sep 30, 2007 Ki Kim G L G Larsen en [43 [43]

Conclusion

Identification of all Pareto

  • ptimal combinations!

Safety for PTG? Reachability for 2PTG? Safety for MPTA? Safety for 1PTG?

Efficient realizations

TG w PO? Safety for PTA?

  • Reachability for 1PTG?

Dealing with undecidability.

  • ∀ ε. |Th-Prac| < ε

1clock 2 clocks 3 clocks 1player 2players time 1 cost mult cost Reach Safety F Obs P Obs

slide-38
SLIDE 38

Thanks for your attention! Please do not hesitate to contact us at: kgl@cs.aau.dk

  • r

www.uppaal.com