Orientering om en ny metode til skeduleringsanalyse og EU-projektet CRAFTERS

Post on 12-Nov-2014

222 views 3 download

Tags:

description

Oplægget blev holdt ved et seminar i InfinIT-interessegruppen Højniveausprog til indlejrede systemer den 12. marts 2014. Læs mere om interessegruppen her: http://infinit.dk/dk/interessegrupper/hoejniveau_sprog_til_indlejrede_systemer/hoejniveau_sprog_til_indlejrede_systemer.htm

Transcript of Orientering om en ny metode til skeduleringsanalyse og EU-projektet CRAFTERS

Schedulability analysis using Uppaaland Uppaal SMC in CRAFTERS

Abdeldjalil Boudjadar,Alexandre David,Jin Hyun Kim,Kim G. Larsen,Marius Mikucionis,Ulrik Nyman,Arne Skou

InfinIT Talk 12th of March 2014

CRAFTERS project

Title ConstRaint and Application driven Frameworkfor Tailoring Embedded Real-time Systems.

Period Jun 2012 - May 2015Website www.crafters-project.orgPeople Two Post Docs @AAU

Partners 25

CRAFTERS project

Goals As direct effects of the project results30% reduction of the total cost of ownership,50% shorter time-to-market, and30% decrease of the number of development

assets are expected.

AAU contributions

Deliverables

• Model transformations (UML -> Uppaal)• Real-time testing tool, Uppaal TRON

Research

• New research on schedulability analysis

Publications

FACS 2013 Hierarchical Scheduling Framework Based onCompositional Analysis Using Uppaal(Published)

ERTS22014 Schedulability and Energy Efficiency forMulti-core Hierarchical Scheduling Systems(Published)

Submitted1 Statistical Model Checking for ImprovedResource Utilization in Hierarchical SchedulingSystems

Submitted2 Degree of Schedulability of Mixed-CriticalityReal-time Systems with Probability-basedSporadic Tasks

A hierarchical scheduling system

System

Component1 Component2

task1 task2 task3 task4 task5

RM

(100,37)

EDF

EDF

(70,25)

(250,40) (400,50) (140,7) (150,7) (300,30)

Figure: Example of hierarchical scheduling system.

Schedulability analysis

?? Do you use hierarchical scheduling??? How do you perform schedulability analysis?

Motivation Separation of concerns. ReComp.

Schedulability analysis

sbfΓ(t) =

⌊t − (Π−Θ)

Π

⌋·Θ + εs (1)

where

εs = max(

t − 2(Π−Θ)− Π

⌊t − (Π−Θ)

Π

⌋, 0). (2)

FACS 2013

SystemEDF

Component1 Component2

task1 task2 task3 task4

EDF,.RM:.scheduling.policies..A,.A1,.A2:.analysis.processes.

A

A1 A2

task5

EDF RM

Figure: Compositional analysis.

Submitted1

∀t ∈ ]0; 2 · LCMW ] : dbfW (t) ≤ sbfΓ(t) (3)

FACS 2013

supplying_time[supid]'==0&& curTime <= sup[supid].prd - sup[supid].budget + supplying_time[supid]&& curTime <= sup[supid].prd

stop_supplying[supid]!

replenishment[supid]!

supplying_time[supid]'==1&& supplying_time[supid]<=sup[supid].budget

curTime <=sup[supid].prd && supplying_time[supid]'==0

NotSupplying

curTime ==sup[supid].prd

curTime < sup[supid].prd -sup[supid].budget + supplying_time[supid]stop_supplying[supid]!

supplying_time[supid]>=sup[supid].budget

start_supplying[supid]!supplying_time[supid]<=sup[supid].budget

supplying[supid]=1Supplying

supplying[supid]=1

supplying[supid]=0

Donesupplying[supid]=0

curTime=0, supplying_time[supid]=0,supplying[supid]=0

Figure: Non-deterministic supplier template

FACS 2013

Listing 1: Data structure for timed actionconst cmd_set_t Target_tracking = {

{ INPUT , 3, 110, 122, 0},{ INPUT , 3, 164, 182, 0},{ INPUT , 3, 100, 122, 0},{ INPUT , 3, 146, 162, 0},{ COMPUTE , 0, 3600, 4000, 0},{ OUTPUT , 3, 200, 222, 0},{ OUTPUT , 3, 146, 162, 0},FIN ,FIN ,FIN ,FIN ,FIN

};

const cmd_set_t Target_sweetening = {{ INPUT , 3, 110, 122, 0},{ COMPUTE , 0, 1800, 2000, 0},FIN ,FIN ,FIN ,FIN ,FIN ,FIN ,FIN ,FIN ,FIN ,FIN

};

ERTS2 2014: Vision

Schedulability requirements

Energy consumption

Hierarchical system architecture

L _

_

_

T2

S

C1 C2

T1 T3 T4

UPPAAL Network of Parameterized

Stopwatch Automata

Schedulability analysis(model

checking)

Energy efficiency(Stochastic model

checking)

SMC

Schedulable: yes / no

Energyprofile

Con

crete

task

beh

avio

r

Con

crete

task

beh

avio

r

CPU1 CPU2

Figure: Overview of the analysis framework

ERTS2 2014: Vision

Schedulability requirements

Energy consumption

Hierarchical system architecture

L _

_

_

T2

S

C1 C2

T1 T3 T4

UPPAAL Network of Parameterized

Stopwatch Automata

Schedulability analysis(model

checking)

Energy efficiency(Stochastic model

checking)

SMC

Schedulable: yes / no

Energyprofile

Con

crete

task

beh

avio

r

Con

crete

task

beh

avio

r

CPU1 CPU2

Figure: Overview of the analysis framework

ERTS2 2014: Case study

Avionics

Hard-Subsystem

( 25, insuf, EDF)

Controls and Display

(20, 15, FP )

Targeting

(40, 23, FP) Navigation

(30, 11, EDF)

Weapon Ctrl.

(10, 8, FP) HUD Display

T9(50,6,50)

MPD Display

T10(50,8,50)

MPD Button Resp.

T11(200,1,200)

Change Display

T12 (200,1,200)

Flight Data

T1(50,8,50)

Steering

T2(80,6,80)

Target Tracking

T3(40,4,40)

Target Sweetening

T4(40,2,40)

AUTO/CCIP Toggle

T5(200,1,200)

Weapon Release

T8(10,1,5)

Weapon Trajectory

T6 (100,7,100)

Reinitiate Trajectory

T7(400,6,400) insuf : insufficient budget

Figure: Architecture of the hierarchical scheduling system

ERTS2 2014: Cumulated energyconsumption

Energy ConsumptionTask 2 ExecutionTask 1 Execution

time

valu

e

0

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

0 30 60 90 120 150 180 210 240 270 300 330 360 390 420 450 480 510 540 570 600 630 660 690

Simulations (1)

Figure: Cumulated energy consumption for two individual tasks

ERTS2 2014: Energy profile

Figure: Energy profile for two tasks, 1000 runs, 1000000 time units

Submitted1

Submitted1 Statistical Model Checking for ImprovedResource Utilization in Hierarchical SchedulingSystems

• Comparison with conventional method.• Discovered error in conventional tool CARTS.

Confirmed by tool makers.

Comparison of schedulability analysis ofCARTS and Uppaal models

Comp Tasks P, WCET CARTS SMCEDF RM EDF RM

S1T1 500, 30 100, 32.5 100, 32.5 100, 33 100, 33T2 500, 100

S2T1 170, 30 100, 46.67 100, 47.5 100, 46 100, 48T2 500, 100

S3T1 250, 40 150, 42.5 150, 42.5 150, 45 150, 45T2 750, 50

S4

T1 80000, 6890 50000, 15082 50000, 15082 50000, 15082 50000, 15082T2 100000, 8192T3 200000, 2644 10000, 1880 10000, 2155.6 10000, 1875 10000, 2155T4 1000000, 5874

Task synchronization

Submitted2

Submitted2 Degree of Schedulability of Mixed-CriticalityReal-time Systems with Probability-basedSporadic Tasks

• Mixed criticality• Sporadic tasks• Simulation

Sporadic task and events

Event patterns

Missing deadlines

Figure: Execution of a sporadic task

PoMD

Definition (Percentage of Missed Deadlines)The PoMD of an entity X for a run π is given by:

PoMDX (π) = (lim supt→∞

Misst (X , π)

Trigt (X , π))× 100

DoQoS

Definition (Degradation of Quality of Service)The DoQoS of a task Ti over a finite set of runs Π is definedas:

DoQoSTi (Π) =

{0 if limt→∞

∑π∈Π Misst (Ti , π) = 0

limt→∞

∑π∈Π Overrunt (Ti ,π)∑

π∈Π Misst (Ti ,π) Otherwise

Sched◦

Definition (The degree of schedulability )We define the Sched◦ of an entity in terms of two factorsSched◦

P and Sched◦D to be given by:

Sched◦P =

{∞ if PoMD = 0

1PoMD Otherwise

}

Sched◦D =

{∞ if DoQoS = 0

1DoQoS Otherwise

}

Sufficient budget

Table: The degree of schedulability of tasks under periodicevents

Component ((40, 23), FPS) PoMD DoQoST p

3 (40, 4), 0 0T s

4(40, 2), 0 0

Case study

Avionics

Hard-Subsystem

( 25, insuf, EDF)

Controls and Display

(20, 15, FP )

Targeting

(40, 23, FP) Navigation

(30, 11, EDF)

Weapon Ctrl.

(10, 8, FP) HUD Display

T9(50,6,50)

MPD Display

T10(50,8,50)

MPD Button Resp.

T11(200,1,200)

Change Display

T12 (200,1,200)

Flight Data

T1(50,8,50)

Steering

T2(80,6,80)

Target Tracking

T3(40,4,40)

Target Sweetening

T4(40,2,40)

AUTO/CCIP Toggle

T5(200,1,200)

Weapon Release

T8(10,1,5)

Weapon Trajectory

T6 (100,7,100)

Reinitiate Trajectory

T7(400,6,400) insuf : insufficient budget

Figure: Architecture of the hierarchical scheduling system

Generic Avionics Components and Tasks

Component Criticality Ti ei pi di Importance

Navigation Hard Aircraft flight data(T p1 ) 8 50(55) critical

critical Steering(T p2 ) 6 80 critical

Targeting Hard Target tracking(T p3 ) 4 40 critical

critical Target sweetening(T s4) 2 40 critical

AUTO/CCIP toggle(T s5) 1 200 critical

Weapon Hard Weapon trajectory(T p6 ) 7 100 critical

Control non-critical Reinitiate trajectory(T s7) 6 400 essential

Weapon release(T p8 ) 1 10 5 critical

Soft

HUD display(T p9 ) 6 55(52) essential

Controls & MPD tactical display(T p10) 8 50(52) essential

Displays MPD button response (T s11) 1 200 background

Change display mode (T s12) 1 200 background

Schedulability degree of componentControls & Displays

Task Sched◦ Budget=14 Budget=17 Budget=19 Budget=20

HUD Display(T9) DoQoS 0.004±0.003 0 0 0PoMD 0.004±0.004 0 0 0

MPD Display(T10) DoQoS 3.068±0.151 0.343±0.052 0.003±0.003 0PoMD 0.231±0.018 0.002±0.002 0.0005±0 0

MPD Button(T11) DoQoS 0 0 0 0PoMD 0 0 0 0

Change Mode(T12) DoQoS 0 0 0 0PoMD 0 0 0 0

ERTS2 2014: Vision

Schedulability requirements

Energy consumption

Hierarchical system architecture

L _

_

_

T2

S

C1 C2

T1 T3 T4

UPPAAL Network of Parameterized

Stopwatch Automata

Schedulability analysis(model

checking)

Energy efficiency(Stochastic model

checking)

SMC

Schedulable: yes / no

Energyprofile

Con

crete

task

beh

avio

r

Con

crete

task

beh

avio

r

CPU1 CPU2

Figure: Overview of the analysis framework