• No results found

Probabilistic Real-Time Systems

N/A
N/A
Protected

Academic year: 2021

Share "Probabilistic Real-Time Systems"

Copied!
32
0
0

Loading.... (view fulltext now)

Full text

(1)

Probabilistic Real-Time Systems

Liliana Cucu-Grosjean, INRIA Nancy-Grand Est
(2)

Outline

Probabilistic Real-Time Systems

Probabilistic Worst-Case Execution Time

Ø  PROARTIS: measurement based approach

Static probabilistic timing analysis

Measurement based timing analysis

(3)

Probabilistic Real-Time Systems

Model

A

periodic task

is characterized by :

release

(worst-case) execution time

(minimal) inter-arrival time

deadline

τ

i

= (

O

i

,

C

i

,

T

i

,

D

i

)

O

i

C

i

T

i

D

i

Model

A

periodic task

is characterized by :

release

(worst-case) execution time

(minimal) inter-arrival time

deadline

τ

i

= (

O

i

,

C

i

,

T

i

,

D

i

)

O

i

C

i

T

i

D

i

τ

1

= (

1

,

2

,

5

,

4

)

0 1 2 3 4 5

6

τ

1

time

Model

A

periodic task

is characterized by :

release

(worst-case) execution time

(minimal) inter-arrival time

deadline

τ

i

= (

O

i

,

C

i

,

T

i

,

D

i

)

O

i

C

i

T

i

D

i

τ

1

= (

1

,

2

,

5

,

4

)

R

1
(4)

One processor, preemptive fixed-priority

τ2 = (3, � 2 3 4 0.50.10.4 � ,6,6)

τ

3

= (

2

,

1 2

0

.

50

.

5

,

6

,

6

)

τ

1

= (

0

,

1

1

,

3

,

3

)

0 1 2 3 4 5 6 7 8 9

10

One processor, preemptive fixed-priority scheduling

11 12 13 14 15 16

τ

i

= (

O

i

,

C

i

,

T

i

,

D

i

)

τ

1

= (

0

,

1

1

,

3

,

3

)

τ2 = (3, � 2 3 4 0.50.10.4 � ,6,6)

τ

3

= (

2

,

1 2

0

.

50

.

5

,

6

,

6

)

(0,1,3,3)

(3,2,6,6)

(2,1,6,6)

17 18

(5)

One processor, preemptive fixed-priority

τ2 = (3, � 2 3 4 0.50.10.4 � ,6,6)

τ

3

= (

2

,

1 2

0

.

50

.

5

,

6

,

6

)

τ

1

= (

0

,

1

1

,

3

,

3

)

0 1 2 3 4 5 6 7 8 9

10

One processor, preemptive fixed-priority scheduling

11 12 13 14 15 16

τ

i

= (

O

i

,

C

i

,

T

i

,

D

i

)

τ

1

= (

0

,

1

1

,

3

,

3

)

τ2 = (3, � 2 3 4 0.50.10.4 � ,6,6)

τ

3

= (

2

,

1 2

0

.

50

.

5

,

6

,

6

)

(0,1,3,3)

(3,2,6,6)

(2,1,6,6)

17 18

(6)

One processor, preemptive fixed-priority

τ2 = (3, � 2 3 4 0.50.10.4 � ,6,6)

τ

3

= (

2

,

1 2

0

.

50

.

5

,

6

,

6

)

τ

1

= (

0

,

1

1

,

3

,

3

)

0 1 2 3 4 5 6 7 8 9

10

One processor, preemptive fixed-priority scheduling

11 12 13 14 15 16

τ

i

= (

O

i

,

C

i

,

T

i

,

D

i

)

τ

1

= (

0

,

1

1

,

3

,

3

)

τ2 = (3, � 2 3 4 0.50.10.4 � ,6,6)

τ

3

= (

2

,

1 2

0

.

50

.

5

,

6

,

6

)

(0,1,3,3)

(3,2,6,6)

(2,1,6,6)

17 18

(7)

One processor, preemptive fixed-priority

τ2 = (3, � 2 3 4 0.50.10.4 � ,6,6)

τ

3

= (

2

,

1 2

0

.

50

.

5

,

6

,

6

)

τ

1

= (

0

,

1

1

,

3

,

3

)

0 1 2 3 4 5 6 7 8 9

10

One processor, preemptive fixed-priority scheduling

11 12 13 14 15 16

τ

i

= (

O

i

,

C

i

,

T

i

,

D

i

)

τ

1

= (

0

,

1

1

,

3

,

3

)

τ2 = (3, � 2 3 4 0.50.10.4 � ,6,6)

τ

3

= (

2

,

1 2

0

.

50

.

5

,

6

,

6

)

(0,1,3,3)

(3,2,6,6)

(2,1,6,6)

17 18

(8)

One processor, preemptive fixed-priority

τ2 = (3, � 2 3 4 0.50.10.4 � ,6,6)

τ

3

= (

2

,

1 2

0

.

50

.

5

,

6

,

6

)

τ

1

= (

0

,

1

1

,

3

,

3

)

0 1 2 3 4 5 6 7 8 9

10

One processor, preemptive fixed-priority scheduling

11 12 13 14 15 16

τ

i

= (

O

i

,

C

i

,

T

i

,

D

i

)

τ

1

= (

0

,

1

1

,

3

,

3

)

τ2 = (3, � 2 3 4 0.50.10.4 � ,6,6)

τ

3

= (

2

,

1 2

0

.

50

.

5

,

6

,

6

)

(0,1,3,3)

(3,2,6,6)

(2,1,6,6)

17 18

R

1

= 1

(9)

Probabilistic real-time systems

Probabilistic analysis and real-time systems

Uncertainties from the system and the environnement

Probabilistic guarantees

time

D

i

O

i

O

i

+

T

i

P(

R

i

>

D

i

)

<

ε

R

i

τ

i

= (

O

i

,

C

i

,

T

i

,

D

i

)

(

O

i

,

C

i

,

T

i

,

D

i

)

X = � xk P(X =xk) �

with the notation for the discret cas

(10)

What a schedule looks like?

τ2 = (3, � 2 3 4 0.50.10.4 � ,6,6) τ3 = (2, � 1 2 0.50.5 � ,6,6)

τ

1

= (

0

,

1

1

,

3

,

3

)

0 1 2 3 4 5 6 7 8 9

10 11 12 13 14 15 16

(2,1,6,6)

17 18

τ

1

= (

0

,

1

1

,

3

,

3

)

τ2 = (3, � 2 3 4 0.50.10.4 � ,6,6) τ3 = (2, � 1 2 0.50.5 � ,6,6)

(

O

i

,

C

i

,

T

i

,

D

i

)

(11)

What a schedule looks like?

τ2 = (3, � 2 3 4 0.50.10.4 � ,6,6) τ3 = (2, � 1 2 0.50.5 � ,6,6)

τ

1

= (

0

,

1

1

,

3

,

3

)

0 1 2 3 4 5 6 7 8 9

10 11 12 13 14 15 16

(2,1,6,6)

17 18

τ

1

= (

0

,

1

1

,

3

,

3

)

τ2 = (3, � 2 3 4 0.50.10.4 � ,6,6) τ3 = (2, � 1 2 0.50.5 � ,6,6)

(

O

i

,

C

i

,

T

i

,

D

i

)

(12)

What a schedule looks like?

τ2 = (3, � 2 3 4 0.50.10.4 � ,6,6) τ3 = (2, � 1 2 0.50.5 � ,6,6)

τ

1

= (

0

,

1

1

,

3

,

3

)

0 1 2 3 4 5 6 7 8 9

10 11 12 13 14 15 16

(2,1,6,6)

17 18

τ

1

= (

0

,

1

1

,

3

,

3

)

τ2 = (3, � 2 3 4 0.50.10.4 � ,6,6) τ3 = (2, � 1 2 0.50.5 � ,6,6)

(

O

i

,

C

i

,

T

i

,

D

i

)

(13)

What a schedule looks like?

τ2 = (3, � 2 3 4 0.50.10.4 � ,6,6) τ3 = (2, � 1 2 0.50.5 � ,6,6)

τ

1

= (

0

,

1

1

,

3

,

3

)

0 1 2 3 4 5 6 7 8 9

10 11 12 13 14 15 16

(2,1,6,6)

17 18

τ

1

= (

0

,

1

1

,

3

,

3

)

τ2 = (3, � 2 3 4 0.50.10.4 � ,6,6) τ3 = (2, � 1 2 0.50.5 � ,6,6)

(

O

i

,

C

i

,

T

i

,

D

i

)

(14)

What a schedule looks like?

τ2 = (3, � 2 3 4 0.50.10.4 � ,6,6) τ3 = (2, � 1 2 0.50.5 � ,6,6)

τ

1

= (

0

,

1

1

,

3

,

3

)

0 1 2 3 4 5 6 7 8 9

10 11 12 13 14 15 16

(2,1,6,6)

17 18

τ

1

= (

0

,

1

1

,

3

,

3

)

τ2 = (3, � 2 3 4 0.50.10.4 � ,6,6) τ3 = (2, � 1 2 0.50.5 � ,6,6)

(

O

i

,

C

i

,

T

i

,

D

i

)

(15)

What a schedule looks like?

τ2 = (3, � 2 3 4 0.50.10.4 � ,6,6) τ3 = (2, � 1 2 0.50.5 � ,6,6)

τ

1

= (

0

,

1

1

,

3

,

3

)

0 1 2 3 4 5 6 7 8 9

10 11 12 13 14 15 16

(2,1,6,6)

17 18

τ

1

= (

0

,

1

1

,

3

,

3

)

τ2 = (3, � 2 3 4 0.50.10.4 � ,6,6) τ3 = (2, � 1 2 0.50.5 � ,6,6)

(

O

i

,

C

i

,

T

i

,

D

i

)

(16)

Outline

Probabilistic Real-Time Systems

Probabilistic Worst-Case Execution Time

Ø  PROARTIS: measurement based approach

Static probabilistic timing analysis

Measurement based timing analysis

(17)

PROARTIS: Probabilistically

Analysable Real-Time Systems

(18)
(19)

Outline

Probabilistic Real-Time Systems

Probabilistic Worst-Case Execution Time

Ø  PROARTIS: measurement based approach

Static probabilistic timing analysis

Measurement based timing analysis

(20)

SPTA*

Static Probabilistic Timing Analysis

The pWCET estimate is obtaining by convolving the ETPs

of each instruction

{(2, 3, 8, 11),

0.2 0.7 0.05 0.05

2 3 8 11

(0.2 , 0.7, 0.05, 0.05)}

(21)

SPTA/2: convolution and requirements

Static Probabilistic Timing Analysis

Requirements of SPTA

Ø  The convolution requires independent random variables

Ø  The ETPs must be defined by a single distribution

Independent and identically distributed

random variables

1

2

0.7 0.3

!

"

#

$

%

& '

7

1

!

"

#

$

%

&

=

1

+

7

2

+

7

1

(

0.7 1

(

0.3

!

"

#

$

%

&

=

8

9

0.7 0.3

!

"

#

$

%

&

(22)

I.i.d. random variables

Independent random variables

Ø  Random variables that describe events which are not related

Ø  “Event A: my laptop died” and “Event B: the beamer does not like

my laptop”

Identically distributed random variables

Ø  Random variables that have the same distribution function

Ø  “Event A: arrival of a client in a bank” and “Event B: arrival of a car

at a gas station”

(23)

Data must be independent

Ø

Hypothesis testing with

Wald-Wolfowitz

test

§  A parameter P is obtained to quantify how often consecutive

execution times are higher/lower than the median

§  If the data are random, P should fall in the central part of a

Gaussian distribution

–  Threshold (0.05) is chosen based on experience/common practice. P

should fall in the central 95% part of the distribution

Required properties: Independence

(24)

Data must be identically distributed

Ø

Hypothesis testing with

Kolmogorov-Smirnov

test

§  Two subsets of data randomly obtained from the trace

§  Distributions compared. A parameter P obtained based on the

maximum distance among both data sets

§  If P is above a given threshold, data are identically distributed

–  Threshold (0.05) is chosen based on experience/common practice

Required properties: Identically distributed

Maximum distance

Whole distribution

(25)

SPTA: I.i.d. random variables

Static Probabilistic Timing Analysis

Ensured at the level of processor instructions

Example: randomisation at cache level, evict on access

§  Pathological eviction patterns are bounded pessimistically (N is the

number of cache entries, K is the number of memory accesses between two consecutive accesses to the same cache entry)

Ø  Some numbers

(26)

Outline

Probabilistic Real-Time Systems

Probabilistic Worst-Case Execution Time

Ø  PROARTIS: measurement based approach

Static probabilistic timing analysis

Measurement based timing analysis

(27)

Measurement Based Probabilistic Timing Analysis

The pWCET estimate is obtained by applying Extreme

Value Theory

(28)

Luxembourg June 19th, 2012

Measurement Based Probabilistic Timing Analysis

First sound utilisation of EVT to pWCET estimating

Ø  The hypothesis of independence and identical distribution is

checked before any EVT utilisation

§  I.i.d. hypothesis is ensured at the level of processor instructions

Ø  Block maxima applied with a proper definition of minimum number

of runs

Ø  Utilisation of a (proven) correct statistical test to check that data

belong to the Gumbel domain

MBPTA/2

(29)

Required properties: Gumbel

Data must fit a Gumbel distribution

Ø

Hypothesis testing with

exponential tail

test

§  A parameter P is obtained for the actual data

§  A confidence interval CI is obtained for the actual data

assuming it fits a Gumbel distribution

§  If P belongs to CI then the data fit a Gumbel distribution

Execution times 6372 3728 6321 8328 8231 9827 : : + Gumbel Parameter P Confidence interval CI

(30)

June 19th, 2012

MBPTA/3

Steps of applying EVT (single-path programs)

Ø  Observations Ø  Grouping Ø  Fitting Ø  Comparison Ø  Tail extension

Convergence

Ø  Continuous rank probability score Observa- tions I.i.d tests Gumbel Fitting (ET)

passed/not passed passed/not passed

CRPS Convergence criteria More runs EVT EVT

(31)

MBPTA/4

Measurement Based Probabilistic Timing Analysis

Multi-path programs

Ø  Independent and identical distributions

§  Identical distributions ensured by the convergence process

Ø  Minimum number of observations

§  Each path must be observed a minimum number of times and it is

ensured by the convergence process

Ø  Path coverage

(32)

Conclusions and future work

SPTA offers a tight pWCET estimate, but impractical for

complex programs

MBPTA is a sound utilisation of EVT, but limited by the

path coverage

Ø  Proof of the limited pessimism of EVT application

Proposition of hybrid approaches

Extending the probabilistic techniques proposed for the

single-core case to the multi-core case

Ø  Identify the existing probabilistic techniques for multi-core

Ø  Ensure the requirements of the PROARTIS single-core

References

Related documents

Melodic knowledge is focused on the ability of systems in choosing and arranging notations that fit the characteristic sound of gamelan melody. Notation pattern recognition

Atomistic simulations using the quasicontinuum method are used to study the role of vacancy defects and angström-scale voids on the mechanical behavior of five tilt bicrys-

If either side make three consecutive fouls it shall count as a goal for the opponents consecutive means without the opponents in the meantime making a foul.. Goal shall be made

The assessment of patients suspected of drug and/or alcohol dependency and the assessment of victims of abuse and neglect are shaped by the culture of the patient population.

Left-behind workers share space with large minority communities who were drawn to the inner city, often in the later phases of industrial growth, to perform the jobs

LJMU is committed to providing research students with relevant and appropriate opportunities to develop both specialist and generic research skills in line with its Researcher

Option 3 does not create a new regulatory environment for the independent healthcare sector, as the use of electronic signatures, and the subsequent electronic transmission

Diagnostic pertaining to literacy and essential skills Scott Murray, President, DataAngel Policy Research Evidence from research on return on training investment Allan