Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient...

45
Efficient Analysis to Provide Weakly- Hard Real-Time Guarantees Zain A. H. Hammadeh

Transcript of Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient...

Page 1: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees

Zain A. H. Hammadeh

Page 2: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees

• Real-Time System?

• Hard Real-Time System?

• Weakly-Hard Real-Time System?

• Weakly-Hard Real-Time Guarantees?

• Efficient Analysis?

2

Page 3: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Primitive Definitions

3

In real-time systems the correctness of the system depends not only on the functional results of the computations, but also on the time at which the results are produced

sensor

interrupt

engine

Page 4: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Primitive Definitions

4

In real-time systems the correctness of the system depends not only on the functional results of the computations, but also on the time at which the results are produced

sensor

interrupt

engine

Void task1 () {

#task_body; }

Void task2 () {

#task_body; }

Void task3 () {

#task_body; }

Page 5: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Primitive Definitions

5

In real-time systems the correctness of the system depends not only on the functional results of the computations, but also on the time at which the results are produced

sensor

interrupt

engine

Void task1 () {

#task_body; }

Void task2 () {

#task_body; }

Void task3 () {

#task_body; }

Task is the executable unite of work scheduled by the operating system

Page 6: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Primitive Definitions

6

In real-time systems the correctness of the system depends not only on the functional results of the computations, but also on the time at which the results are produced

sensor

interrupt

engine

Void task1 () {

#task_body; }

Void task2 () {

#task_body; }

Void task3 () {

#task_body; }

Page 7: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Primitive Definitions

7

In real-time systems the correctness of the system depends not only on the functional results of the computations, but also on the time at which the results are produced

sensor

interrupt

engine

Scheduler

Page 8: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Primitive Definitions

8

In real-time systems the correctness of the system depends not only on the functional results of the computations, but also on the time at which the results are produced

sensor

interrupt

engine

Scheduler

Scheduling policy determines how the contention between tasks is resolved

Page 9: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Primitive Definitions

9

Time

Interrupt

Sensor

Engine

Page 10: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Primitive Definitions

10

Time

Interrupt

Sensor

Engine

Page 11: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Primitive Definitions

11

Time

Activation Interrupt

Sensor

Engine

Page 12: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Primitive Definitions

12

Time

Activation Interrupt

Sensor

Engine

Period

Page 13: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Primitive Definitions

13

Time

Activation Interrupt

Sensor

Engine

Period

Page 14: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Primitive Definitions

14

Time

Activation

Termination

Interrupt

Sensor

Engine

Period

Page 15: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Primitive Definitions

15

Time

Activation

Termination Execution time

Interrupt

Sensor

Engine

Period

Page 16: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Primitive Definitions

16

Time

Activation

Termination Execution time

Interrupt

Sensor

Engine

Period

Page 17: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Primitive Definitions

17

Time

Activation

Termination Execution time

Priority

Interrupt

Sensor

Engine

Period

Page 18: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Primitive Definitions

18

Time

Activation

Termination Execution time

Priority

Interrupt

Sensor

Engine

Period

Page 19: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Primitive Definitions

19

Time

Activation

Termination Execution time

Priority

Interrupt

Sensor

Engine

Period

Page 20: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Primitive Definitions

20

Time

Activation

Termination Execution time

Priority

Interrupt

Sensor

Engine

Period

Page 21: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Primitive Definitions

21

Time

Activation

Termination

Preemption

Execution time

Priority

Interrupt

Sensor

Engine

Period

Page 22: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Primitive Definitions

22

Time

Activation

Termination

Preemption

Execution time

Priority

Interrupt

Sensor

Engine

Period

Page 23: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Primitive Definitions

23

Time

Activation

Termination

Preemption Resume

Execution time

Priority

Interrupt

Sensor

Engine

Period

Page 24: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Primitive Definitions

24

Time

Activation

Termination

Preemption Resume

Execution time

Priority

Interrupt

Sensor

Engine

Period

Page 25: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Primitive Definitions

25

Time

Activation

Termination

Preemption Resume

Execution time

Priority

Interrupt

Sensor

Engine

Period

Page 26: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Primitive Definitions

26

Time

Activation

Termination

Preemption Resume

Execution time

Priority

Interrupt

Sensor

Engine

Static Priority Preemptive SPP

Period

Page 27: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Scheduling Policy

• Static priority preemptive SPP

• Static priority non-preemptive SPNP

• Earliest deadline first EDF

• Time division multiple access TDMA

• Round-Robin RR

27

Page 28: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Primitive Definitions

28

Time

Activation

Termination

Preemption Resume

Execution time

Priority

Interrupt

Sensor

Engine

Static Priority Preemptive SPP

Period

Page 29: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Primitive Definitions

29

Time

Activation

Termination

Preemption Resume

Execution time Response time

Priority

Interrupt

Sensor

Engine

Static Priority Preemptive SPP

Period

Page 30: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Primitive Definitions

30

Time

Activation

Termination

Preemption Resume

Execution time

Deadline

Response time

Priority

Interrupt

Sensor

Engine

Static Priority Preemptive SPP

Period

Page 31: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Primitive Definitions

31

Time

Activation

Termination

Preemption Resume

Execution time

Deadline

Response time

Priority

Interrupt

Sensor

Engine

Static Priority Preemptive SPP

Period

Page 32: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Primitive Definitions

32

Time

Activation

Termination

Preemption Resume

Execution time

Deadline

Response time

Priority

Interrupt

Sensor

Engine

Static Priority Preemptive SPP

Period

Page 33: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Hard vs. Weakly-Hard

• Response time <= Deadline • Hard real-time systems

– All deadlines have to be met – Safety-critical systems like ABS are Hard real-time

systems

• Weakly-hard real-time systems – The distribution of deadline misses/met are precisely

bounded – Control system, Image processing are Weakly-hard

real-time systems

• Others: Firm and Soft

33

Page 34: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Efficient analysis for real-times guarantees

Hard real-time

• It should cover performance corner-cases – Worst-case scenario

• Worst-case response time

Weakly-hard real-time

• It should cover performance corner-cases – Worst-case scenario

• Worst-case response time

• Bounds on the distribution of deadline misses

34

Page 35: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Worst-Case Response Time Analysis

35

1 1 1

1

3

2

2

𝝉𝟏

𝝉𝟐

𝝉𝟑

𝝉𝟒 1

1

3

Time(ms) 0 10

SPP

Page 36: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Worst-Case Response Time Analysis

36

1 1 1

1

3

2

2

𝝉𝟏

𝝉𝟐

𝝉𝟑

𝝉𝟒 1

1

3

Time(ms) 0 10

WCRT4 = 16ms

SPP

Page 37: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Worst-Case Response Time Analysis

37

1 1 1

1

3

2

2

𝝉𝟏

𝝉𝟐

𝝉𝟑

𝝉𝟒 1

1

3

Time(ms) 0 10 largest level-4 busy window

WCRT4 = 16ms

SPP

Page 38: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Worst-Case Response Time Analysis

38

1 1 1

1

3

2

2

𝝉𝟏

𝝉𝟐

𝝉𝟑

𝝉𝟒 1

1

3

Time(ms) 0 10 largest level-4 busy window

WCRT4 = 16ms

SPP

𝑫𝟒 = 𝟏𝟐ms

Page 39: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Worst-Case Response Time Analysis

39

1 1 1

1

3

2

2

𝝉𝟏

𝝉𝟐

𝝉𝟑

𝝉𝟒 1

1

3

Time(ms) 0 10 largest level-4 busy window

WCRT4 = 16ms

SPP

𝑫𝟒 = 𝟏𝟐ms

Page 40: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Weakly-Hard Guarantees

40

It is described in a form of m-out-of-k (m,k) Example: (2,5), (1,2)

Page 41: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Weakly-Hard Guarantees

41

It is described in a form of m-out-of-k (m,k) Example: (2,5), (1,2)

The distribution of deadline misses/met?

Page 42: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

The Deadline Miss Model for a task 𝜏𝑖 is a function

𝑑𝑚𝑚𝑖: ℕ+ → ℕ+ such that 𝑑𝑚𝑚𝑖(𝑘)

• bounds the maximum number of executions of 𝜏𝑖 which may have a response time larger than 𝐷𝑖 in a window of k consecutive executions of 𝜏𝑖

Deadline Miss Model

42

Page 43: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

In many practical cases, embedded system applications accept occasional deadline violations as long as their number can be bounded

• I focus on bounding the distribution of deadline misses in a form of (m,k)-guarantees for independent weakly-hard real-time tasks and task chains using TWCA.

• Exploring the design space for (m,k)-schedulability is a part of my research as well.

Summary

43

Page 44: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Publications

• Zain A. H. Hammadeh, Sophie Quinton, and Rolf Ernst, "Extending Typical Worst-Case Analysis Using Response-Time Dependencies to Bound Deadline Misses" in Proceedings of the 14th International Conference on Embedded Software, (New Delhi, India), October 2014.

• Wenbo Xu, Zain A. H. Hammadeh, Sophie Quinton, Alexander Kr öller, and Rolf Ernst, "Improved Deadline Miss Models for Real-Time Systems using Typical Worst-Case Analysis" in 27th Euromicro Conference on Real-Time Systems, (Lund, Sweden), July 2015.

• Leonie Ahrendts, Zain A. H. Hammadeh, and Rolf Ernst, "Guarantees for Runnable Entities with Heterogeneous Real-Time Requirements" in Design, Automation & Test in Europe Conference & Exhibition (DATE), March 2016.

• Zain A. H. Hammadeh, Sophie Quinton, Rafik Henia, Laurent Rioux, and Rolf Ernst, "Bounding Deadline Misses in Weakly-Hard Real-Time Systems with Task Dependencies" in Design Automation and Test in Europe (DATE), (Lausanne, Switzerland), March 2017.

44

Page 45: Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees · Zain A. H. Hammadeh . Efficient Analysis to Provide Weakly-Hard Real-Time Guarantees •Real-Time System? ... Preemption

Publications • Rafik Henia, Laurent Rioux, Nicolas Sordon, Zain A. H. Hammadeh, Sophie Quinton,

and Rolf Ernst, "Demo Abstract: Bounding Deadline Misses for Weakly-Hard Real-Time Systems Designed in CAPELLA" in The 2017 IEEE Real-Time and Embedded Technology and Applications Symposium (RTAS) - Demo Track, (Pittsburgh, PA, USA), April 2017

• Zain A. H. Hammadeh, Sophie Quinton, Marco Panunzio, Rafik Henia, Laurent Rioux, and Rolf Ernst, "Budgeting Under-specified Tasks for Weakly-Hard Real-Time Systems" in The 29th Euromicro Conference on Real-Time Systems (ECRTS17), (Dubrovnik, Croatia), June 2017.

• Mohammad Hamad, Zain A. H. Hammadeh, Selma Saidi, Vassilis Prevelakis und Rolf Ernst, "Prediction of Abnormal Temporal Behavior in Real-Time Systems" in The 33rd ACM/SIGAPP Symposium On Applied Computing (SAC 2018), (Pau, France), April 2018.

45