41
1 Response Time Analysis for G - EDF and G - DM Scheduling of Sporadic DAG - Tasks with Arbitrary Deadline Andrea Parri, Alessandro Biondi and Mauro Marinoni Scuola Superiore Sant’Anna Pisa, Italy

Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

1

Response Time Analysis for

G-EDF and G-DM Scheduling

of Sporadic DAG-Tasks

with Arbitrary Deadline

Andrea Parri, Alessandro Biondi and Mauro Marinoni

Scuola Superiore Sant’Anna – Pisa, Italy

Page 2: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

2

Introduction

Multicore revolution

New parallel programming models

for expressing parallel computational

activities

Intel TBB

Page 3: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

3

Introduction

Big Data

Novel programming models

based on the Map-Reduce

paradigm that relies on parallel

processing

Page 4: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

4

Introduction

JUNIPER EU Project – supported this work

Goal: enable application development with

performance guarantees required for real-time

exploitation of large streaming data sources and

stored data;

Case-study: applications for credit cards.

Page 5: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

5

DAG-Task

Task model for expressing parallel computations

with precedence constraints

A task is described with a Directed Acyclic Graph (DAG)

𝑒1

𝑒2

𝑒3

𝑒4

𝑒5

𝑒6

𝑒7

X

Page 6: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

6

DAG-Task

𝑒1

𝑒2

𝑒3

𝑒4

𝑒5

𝑒6

𝑒7

Vertex – sequential

computation with

WCET 𝑒𝑖

Page 7: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

7

DAG-Task

𝑒1

𝑒2

𝑒3

𝑒4

𝑒5

𝑒6

𝑒7

Edge – precedence

constraint among two

computational activities

Page 8: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

8

DAG-Task

𝑒1

𝑒2

𝑒3

𝑒4

𝑒5

𝑒6

𝑒7

Note: this model allows to

express parallelism

Page 9: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

9

DAG-Task

𝑒1

𝑒2

𝑒3

𝑒4

𝑒5

𝑒6

𝑒7

Release of a DAG-Task 𝜏𝑖

All the vertices are released simultaneously but it

can be that not all of them are enabled due to

precedence constrains

𝜏𝑖

Page 10: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

10

Sporadic DAG-Task

𝑒1

𝑒2

𝑒3

𝑒4

𝑒5

𝑒6

𝑒7

DAG-Task 𝜏𝑖

Released with a minimum inter-arrival time 𝑻𝒊

Each vertex must complete within a deadline 𝑫𝒊

𝜏𝑖

Page 11: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

11

Example

𝑒1

𝑒2

𝑒3

𝑒4

𝑒5

𝑒6

processor 1

processor 2

𝑒1

𝑒2

𝑒3

0 2 4 6 8

𝑒1 2

𝑒2 2

𝑒3 1

𝑒4 1

𝑒5 2

𝑒6 3

Page 12: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

12

Example

𝑒1

𝑒2

𝑒3

𝑒4

𝑒5

𝑒6

processor 1

processor 2

𝑒1

𝑒2

𝑒3 𝑒4

0 2 4 6 8

𝑒1 2

𝑒2 2

𝑒3 1

𝑒4 1

𝑒5 2

𝑒6 3

Page 13: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

13

Example

𝑒1

𝑒2

𝑒3

𝑒4

𝑒5

𝑒6

processor 1

processor 2

𝑒1

𝑒2

𝑒3 𝑒4 𝑒5

𝑒6

0 2 4 6 8

𝑒1 2

𝑒2 2

𝑒3 1

𝑒4 1

𝑒5 2

𝑒6 3

Page 14: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

14

Scheduling Problem

Given

a set of N sporadic DAG-Tasks;

A scheduling algorithm (G-EDF or G-DM);

A platform with m identical processors;

verify if all deadlines are guaranteed.

Page 15: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

15

State of The Art

Existing schedulability analysis can be split in 3

categories:

Based on resource augmentation (speed-up);

(Baruah et al., Bonifaci et al., Nilissen et al.,…)

Based on capacity augmentation;

(Kim et al., Li et al., Lakshmanan et al., …)

Based on Response-Time Analysis.

(Maia et al., Chwa et al., Melani et al., …)

Page 16: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

16

This Work

Response-Time Analysis of Sporadic DAG-Tasks under both G-EDF and G-DM

Contribution w.r.t. the state of the art:

• Vertices-oriented analysis;

• Tasks can have arbitrary deadlines;

• Vertices can have arbitrary utilization;

• Augmentation bounds proved for N=1.

Page 17: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

17

Response-Time Analysis

For each DAG-Task 𝜏𝑖,

For each vertex 𝑣 of 𝜏𝑖,

Each job of vertex 𝑣 must complete within a deadline 𝑫𝒊

𝑒𝑣 + 𝐼𝑣 = 𝑹𝒗 ≤ 𝐷𝑖

Vertex WCET

Worst-case scheduling interference

Page 18: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

18

Response-Time Analysis

For each DAG-Task 𝜏𝑖,

For each vertex 𝑣 of 𝜏𝑖,

Each job of vertex 𝑣 must complete within a deadline 𝑫𝒊

𝑒𝑣 + 𝐼𝑣 = 𝑹𝒗 ≤ 𝐷𝑖

Not easy to compute

for multiprocessor systems!

Page 19: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

19

Response-Time Analysis

Our approach: compute an upper-bound 𝐼 𝑣 of the interference 𝐼𝑣 specific for each vertex 𝑣, so

obtaining a response-time upper-bound 𝑹𝒗

𝑒𝑣 + 𝐼𝑣 = 𝑹𝒗 ≤

𝑒𝑣 + 𝐼 𝑣 ⇒ 𝑅𝑣 ≤ 𝑹𝒗

Page 20: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

20

Response-Time Analysis

Main result of this work: we proved that

𝑅𝑣 ≤ 𝑹𝒗

𝑹𝒗 = 𝓁𝑣+ +1

𝑚

𝑣′

𝑾𝒗,𝒗′ 𝑹𝒗, 𝑌𝑣′ − 𝓁𝑣+

Critical path length:

maximum sum of WCETs in a path ending with 𝑣

Page 21: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

21

Critical Path

Critical path length: maximum sum of WCETs in a

path ending with 𝒗

1

3

4

6

2

8

4

𝒗1+4+2+4 = 11

3+6+4 = 13

𝓁𝑣+ = 13

Page 22: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

22

Response-Time Analysis

Main result: we proved that

𝑅𝑣 ≤ 𝑹𝒗

𝑹𝒗 = 𝓁𝑣+ +1

𝑚

𝑣′

𝑾𝒗,𝒗′ 𝑹𝒗, 𝑌𝑣′ − 𝓁𝑣+

Sum on all vertices 𝒗′ in the task-set

Page 23: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

23

Response-Time Analysis

Main result: we proved that

𝑅𝑣 ≤ 𝑹𝒗

𝑹𝒗 = 𝓁𝑣+ +1

𝑚

𝑣′

𝑾𝒗,𝒗′ 𝑹𝒗, 𝑌𝑣′ − 𝓁𝑣+

Upper-bound on the worst-case workloadgenerated by 𝒗′ interfering with 𝒗

Page 24: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

24

Worst-Case Workload

Upper-bound on the worst-case workload generated by 𝒗′ interfering with 𝒗

𝑾𝒗,𝒗′ 𝑹𝒗, 𝑌𝑣′

Tentative response-time

of vertex 𝑣, used in the

fixed-point iteration starting with 𝑹𝒗 = 𝒆𝒗

Response-time upper-bound

Must be always greater than

the response-time (𝑌𝑣′ = 𝐷𝑣 + 1 in the limit case)

Page 25: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

25

Worst-Case Workload

A generic vertex 𝒗′ interferes with 𝒗 released at 𝑡

𝑡 time

𝑡 − 𝑌𝑣′

𝑌𝑣′𝒗′

If shifted more on the left the job of 𝒗′

will be completed when 𝒗 is released

Release of a job of 𝒗

Page 26: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

26

Worst-Case Workload

A generic vertex 𝒗′ interferes with 𝒗 released at 𝑡

𝑡 time

𝑡 − 𝑌𝑣′𝑡 + 𝑹𝒗

𝑌𝑣′ + 𝑹𝒗

𝑌𝑣′ + 𝑹𝒗𝑇𝑣′

𝑒𝑣′Interferingworkload

In case of G-DM

Null for vertices of

lower-priority tasks

Page 27: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

27

Worst-Case Workload

A generic vertex 𝒗′ interferes with 𝒗 released at 𝑡

𝑡 time

𝑡 − 𝑌𝑣′

𝐷𝑣′𝒗′

𝑡 + 𝐷𝑣

Jobs of 𝒗′ released after𝑡 + 𝐷𝑣 − 𝐷𝑣′ will

not interfere with 𝒗

In case of G-EDF

Page 28: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

28

Worst-Case Workload

A generic vertex 𝒗′ interferes with 𝒗 released at 𝑡

𝑡 time

𝑡 − 𝑌𝑣′𝑡 + 𝐷𝑣

In case of G-EDF

𝑡 + 𝐷𝑣 − 𝐷𝑣′

𝑌𝑣′ +𝑚𝑖𝑛{𝑹𝒗, 𝐷𝑣 − 𝐷𝑣′}

𝑇𝑣′𝑒𝑣′

Interferingworkload

Page 29: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

29

Response-Time Analysis

Successors in the same job of a DAG-task cannot interfere

𝑒1

𝑒2

𝑒3

𝑒4

𝑒5

𝑒6

𝑒7

𝒗other tasks

Page 30: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

30

Response-Time Analysis

Main result: we proved that

𝑅𝑣 ≤ 𝑹𝒗

𝑹𝒗 = 𝓁𝑣+ +1

𝑚

𝑣′

𝑾𝒗,𝒗′ 𝑹𝒗, 𝑌𝑣′ − 𝓁𝑣+

Page 31: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

31

Schedulability Test

Algorithm RTA(N) Maximum number of iterations

Page 32: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

32

Schedulability Test

1. We start with 𝑌𝑣 = 𝐷𝑣 + 1, ∀𝑣, i = 1

2. Compute the fixed-point of

𝑹𝒗 = 𝓁𝑣+ +

1

𝑚 𝑣′𝑾𝒗,𝒗′ 𝑹𝒗, 𝑌𝑣′ − 𝓁𝑣

+

3. If 𝑹𝒗 ≤ 𝑫𝒗 return SCHEDULABLE

4. If 𝑌𝑣 == 𝑹𝒗, ∀𝑣 OR i==N return NOT SCHEDULABLE

5. Else, update response-times as 𝑌𝑣 = 𝑹𝒗, ∀𝑣 and

go to step 2

Pseudo-Polynomial Complexity𝑖 + +

Algorithm RTA(N)

Page 33: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

33

Polynomial-Time Schedulability Test

If we set 𝑌𝑣 = 𝐷𝑣 + 1 and 𝑅𝑣 = 𝐷𝑣 it is possible to obtain a simple polynomial-time schedulabilitytest without involving any iteration

𝑹𝒗 = 𝓁𝑣+ +1

𝑚

𝑣′

𝑾𝒗,𝒗′ 𝐷𝑣, 𝐷𝑣′ + 1 − 𝓁𝑣+

Polynomial Complexity

Page 34: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

34

Augmentation Bound

In case of a task-set composed of a single DAG-

Task (N=1) we proved that

Our test based on response-time analysis has

Augmentation bound < 3 for G-EDF;

Augmentation bound < 5 for G-DM.

Page 35: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

35

Experimental Results

The proposed schedulability tests have been

evaluated by using synthetic workload

libdag – DAG-Tasks generator and

schedulability test. Soon publicly available online!

Comparison against the test based on

augmentation bound proposed in

V. Bonifaci, A. Marchetti-Spaccamela, S. Stiller, and A. Wiese.

“Feasibility analysis in the sporadic DAG task model”, In proc. of ECRTS 2013

To the best of our knowledge it is the onlytest dealing with arbitrary deadlines

Page 36: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

36

Experimental Results

Number N of external iterations in our algorithm

The test of Bonifaci et al.

is based on a

workload approximation

up to an 𝜖-error

with 2−𝛿

𝛿

Page 37: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

37

Experimental Results

Running times of the schedulability tests

Exponential increase

of the running time as the test precision increases

RTA test has

running time lower oftwo orders of magnitude

(Intel Xeon @ 3.5 Ghz)

Page 38: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

38

Experimental Results

Take-away messages

• RTA test outperforms

the speed-up based

test in all the tested

configurations;

• In some cases our

polynomial-time test

performs better than

the speed-up based

test that has pseudo-

polynomial complexity

𝑈 = 10

Page 39: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

39

Conclusions

We proposed a new Response-Time Analysis for

the sporadic DAG-Task model under both G-EDF

and G-DM scheduling;

The analysis handles DAG-Tasks with arbitrary

deadline and arbitrary utilization;

Two schedulability tests have been derived

(pseudo-polynomial and polynomial complexity);

Extensive set of experimental results confirmed

the effectiveness of the test.

Page 40: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

40

Future Work

More accurate characterization of the interfering

workload;

Support for conditional statements in the DAG-

Task;

Integration of locking protocols in the analysis;

Handle distributed computations.

Page 41: Response Time Analysis for G-EDF and G-DM Scheduling of ...€¦ · Response Time Analysis for G-EDF and G-DM Scheduling of Sporadic DAG-Tasks with Arbitrary Deadline Andrea Parri,

41

Thank you!Alessandro Biondi

[email protected]