Partitioned Fixed-Priority Scheduling of Parallel Tasks...

56
Partitioned Fixed-Priority Scheduling of Parallel Tasks Without Preemptions Daniel Casini * , Alessandro Biondi * , Geoffrey Nelissen , and Giorgio Buttazzo * * ReTiS Lab, Scuola Superiore Sant’Anna, Pisa, Italy CISTER, ISEP, Polytechnic Institute of Porto, Portugal

Transcript of Partitioned Fixed-Priority Scheduling of Parallel Tasks...

Page 1: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

Partitioned Fixed-Priority Scheduling of Parallel Tasks

Without Preemptions

Daniel Casini*, Alessandro Biondi*, Geoffrey Nelissen†, and Giorgio Buttazzo*

* ReTiS Lab, Scuola Superiore Sant’Anna, Pisa, Italy

† CISTER, ISEP, Polytechnic Institute of Porto, Portugal

Page 2: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

2Daniel Casini

Overview

Partitioned Fixed-Priority Scheduling of Parallel Tasks Without Preemptions

• Each task is represented by a Direct Acyclic Graph,and is characterized by

i. a minimum inter-arrival time 𝑇𝑖

ii. a constrained deadline 𝐷𝑖 ≤ 𝑇𝑖

iii. a fixed priority 𝜋𝑖

Each node is characterized

by a WCET 𝐶𝑗𝑖

Page 3: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

3Daniel Casini

Overview

• Each task is represented by a Direct Acyclic Graph,and is characterized by

i. a minimum inter-arrival time 𝑇𝑖

ii. a constrained deadline 𝐷𝑖 ≤ 𝑇𝑖

iii. a fixed priority 𝜋𝑖

Partitioned Fixed-Priority Scheduling of Parallel Tasks Without Preemptions

Each node is characterized

by a WCET 𝐶𝑗𝑖

Page 4: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

4Daniel Casini

Overview

Partitioned Fixed-Priority Scheduling of Parallel Tasks Without Preemptions

• Each node is statically assigned to a core

• Nodes of the same task can be allocated to different cores

Node-to-core Mapping

Core 1 Core 2 Core 3 Core 4

Para

llelTa

sks

Page 5: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

5Daniel Casini

Overview

Partitioned Fixed-Priority Scheduling of Parallel Tasks Without Preemptions

𝑣𝐿𝑃

𝑡

𝑣𝐻𝑃

𝑡

Non-preemptive blocking

As soon a node starts executing, it

cannot be preempted

Page 6: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

6Daniel Casini

Why non-preemptive scheduling?

Predictable management of local memories

Memory Feasibility Analysis of Parallel Tasks

Running on Scratchpad-Based Architectures

Daniel Casini, Alessandro Biondi, Geoffrey Nelissen and Giorgio Buttazzo

This morning @ RTSS

e.g., nodes can pre-load data from scratchpads

before start executing

Page 7: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

7Daniel Casini

Why non-preemptive scheduling?

Predictable management of local memories

Reduces context-switch overhead

Simplifies WCET Analysis

Use of HW accelerators and GPUs

Can be a good choice for executing

deep neural networks

Page 8: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

8Daniel Casini

Why non-preemptive scheduling?

• We profiled a deep neural network executed by Tensorflow a8-core Intel i7 machine @ 3.5GHz

More than 34000 nodes where only about

1.2% of them have execution times larger

than 100 microseconds

Page 9: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

9Daniel Casini

Overview of the analysis framework

Node-to-core Mapping

Core 1 Core 2 Core 3 Core 4

Para

llelTa

sks

Response-time analysis for parallel tasks

Schedulable? (yes/no)

Uniprocessor

analysis for

SS tasks

Se

lf-s

usp

endin

g

Ta

sks

Uniprocessor

analysis for

SS tasks

Uniprocessor

analysis for

SS tasks

Uniprocessor

analysis for

SS tasks

Page 10: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

10Daniel Casini

Overview of the analysis framework

Node-to-core Mapping

Core 1 Core 2 Core 3 Core 4

Para

llelTa

sks

Response-time analysis for parallel tasks

Schedulable? (yes/no)

Uniprocessor

analysis for

SS tasks

Se

lf-s

usp

endin

g

Ta

sks

Uniprocessor

analysis for

SS tasks

Uniprocessor

analysis for

SS tasks

Uniprocessor

analysis for

SS tasks

Part II

Part I

Part III

Page 11: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

11Daniel Casini

Overview of the analysis framework

Node-to-core Mapping

Core 1 Core 2 Core 3 Core 4

Para

llelTa

sks

Response-time analysis for parallel tasks

Schedulable? (yes/no)

Uniprocessor

analysis for

SS tasks

Se

lf-s

usp

endin

g

Ta

sks

Uniprocessor

analysis for

SS tasks

Uniprocessor

analysis for

SS tasks

Uniprocessor

analysis for

SS tasks

Part II

Part I

Part III

Page 12: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

12Daniel Casini

Part I:

Response-time analysis for

parallel tasks

Page 13: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

13Daniel Casini

Intuition

𝑣1

𝑣2

𝑣4

𝑣5

𝑒𝑥𝑒𝑐𝑢𝑡𝑖𝑜𝑛 𝑟𝑒𝑔𝑖𝑜𝑛𝑝1

𝑝2

𝑝2 𝑣3

𝑡

𝑣3

𝑣6

𝑠𝑢𝑠𝑝𝑒𝑛𝑠𝑖𝑜𝑛 𝑟𝑒𝑔𝑖𝑜𝑛

𝑝1

𝑡

𝑣1

𝑣6

𝑣2 𝑣4

𝑣7

𝑣5

• Each core ‘perceives’ the execution of a parallel task as aninterleaved sequence of execution and suspension regions

Suspension regions correspond toexecution regions on a different core

𝑣7

Page 14: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

14Daniel Casini

Intuition

𝑣1

𝑣2

𝑣4

𝑣5

𝑒𝑥𝑒𝑐𝑢𝑡𝑖𝑜𝑛 𝑟𝑒𝑔𝑖𝑜𝑛𝑝1

𝑝2

𝑣3

𝑠𝑢𝑠𝑝𝑒𝑛𝑠𝑖𝑜𝑛 𝑟𝑒𝑔𝑖𝑜𝑛

𝑣6 𝑣7

𝑝2 𝑣3

𝑡

𝑣6

𝑝1

𝑡

𝑣1 𝑣2 𝑣4 𝑣5 𝑣7

• Paths can be mapped to a self-suspending tasks

Page 15: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

15Daniel Casini

Intuition

𝑣1 𝑣5𝑣3 𝑣6 𝑣7

• Paths can be mapped to a self-suspending tasks

Path

𝐶1 𝐶3 𝐶5 𝐶6 𝐶7

SegmentedSS-tasks

𝑝1

𝑝2

𝑒𝑥𝑒𝑐𝑢𝑡𝑖𝑜𝑛 𝑟𝑒𝑔𝑖𝑜𝑛

𝑠𝑢𝑠𝑝𝑒𝑛𝑠𝑖𝑜𝑛 𝑟𝑒𝑔𝑖𝑜𝑛

𝐶1𝑆𝑆 = 𝐶1 𝐶2

𝑆𝑆 = 𝐶5 𝐶3𝑆𝑆 = 𝐶7

The length of each execution region directly maps to the WCET of a node in the graph

Page 16: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

16Daniel Casini

Intuition

SegmentedSS-tasks

𝑆1𝑆𝑆 = 𝑅3 𝑆2

𝑆𝑆 = 𝑅6

The length of each suspension region depends on the response time of nodes allocated to different cores

Complex inter-core

dependencies can arise

𝑝2 𝑣3

𝑡

𝑣6

𝑝1

𝑡

𝑣1 𝑣2 𝑣4 𝑣5 𝑣7

Page 17: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

17Daniel Casini

Solution (from Fonseca et al. 2017)

• Recursive algorithm to unfold response-time dependencies:

𝑣1 𝑣3𝑣2 𝑣4 𝑣5 𝑣6 𝑣7

𝑅𝑆𝑆4

𝑆1𝑆𝑆3 = 𝑅𝑆𝑆4

𝑅𝑆𝑆3

𝑆1𝑆𝑆2 = 𝑅𝑆𝑆3

𝑅𝑆𝑆2

𝑆1𝑆𝑆1 = 𝑅𝑆𝑆2

𝑅𝑆𝑆1

𝑝1 𝑝2 𝑝3 𝑝4

Page 18: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

18Daniel Casini

Parallel tasks without preemptions

• We extended this approach to work under non-preemptivescheduling

Need for a fine-grained analysis for

non-preemptive self-suspending tasks

Our next contribution

Page 19: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

19Daniel Casini

Motivation

Part II:Analysis for non-preemptive

self-suspending tasks

Page 20: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

20Daniel Casini

Overview of the analysis framework

Node-to-core Mapping

Core 1 Core 2 Core 3 Core 4

Para

llelTa

sks

Response-time analysis for parallel tasks

Schedulable? (yes/no)

Uniprocessor

analysis for

SS tasks

Se

lf-s

usp

endin

g

Ta

sks

Uniprocessor

analysis for

SS tasks

Uniprocessor

analysis for

SS tasks

Uniprocessor

analysis for

SS tasks

Page 21: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

21Daniel Casini

Overview of the analysis for SS-tasks

Two different approaches:

Holistic analysis1

Segment-based analysis2

• Computes the RT of a whole self-suspending task

• Analytically dominates state-of-the-art analysis (Dong et al. 2018)

• Computes the RT of individual segments

Ci =

all segments

Ci,j Si =

all segments

Si,j

per-task response time bound

per-segment response time bounds

Page 22: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

22Daniel Casini

Overview of the analysis for SS-tasks

Two different approaches:

Holistic analysis1

Segment-based analysis2

• Computes the RT of a whole self-suspending task

• Analytically dominates state-of-the-art analysis (Dong et al. 2018)

• Computes the RT of individual segments

Ci =

all segments

Ci,j Si =

all segments

Si,j

per-task response time bound

per-segment response time bounds

Page 23: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

23Daniel Casini

Analysis for SS-tasks

Response-time analysis

Interference due to

higher-priority segments

Non-preemptive blocking due to

lower-priority segments

Page 24: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

24Daniel Casini

Computing Interference

release

deadline = period

maximum possible release jitter

response time bound

• Interference from higher-priority tasks is accounted bymeans of the following worst-case scenario*:

• The response time bound can be initially approximated to thetask’s deadline and iteratively refined

• Holistic and segmented analyses are combined duringthe iterative refinement

*Jian-Jia Chen et al., “Many suspensions, many problems: a review of self-suspending tasks in real-time systems”, Real-time System Journal.

Page 25: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

25Daniel Casini

Fine-grained accounting of blocking

• With a multiset approach

𝜏𝐿𝑃

𝑡

𝜏𝐻𝑃

𝑡

multiset

Task release Segment release

Two segmentedSS-tasks

contending for the same CPU

Contains the WCET of allthe lower-priority segments

that may block the task under analysis in a window of length ∆

Page 26: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

26Daniel Casini

Fine-grained accounting of blocking

• With a multiset approach

𝜏𝐿𝑃

𝑡

𝜏𝐻𝑃

𝑡

multiset

Task release Segment release

Two segmentedSS-tasks

contending for the same CPU

Contains the WCET of allthe lower-priority segments

that may block the task under analysis in a window of length ∆

Page 27: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

27Daniel Casini

Non-preemptive self-suspending tasks

Now we have our analysis!

Page 28: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

28Daniel Casini

Non-preemptive self-suspending tasks

Now we have our analysis!

Page 29: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

29Daniel Casini

Non-preemptive self-suspending tasks

Now we have our analysis!

The RT of a parallel task can be derived from the

maximum RT of all its paths

𝑅′

𝑅′′

𝑅′′′

𝑹 = 𝐦𝐚𝐱(𝑹′, 𝑹′′, 𝑹′′′)

Page 30: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

30Daniel Casini

Overview of the analysis framework

Node-to-core Mapping

Core 1 Core 2 Core 3 Core 4

Para

llelTa

sks

Response-time analysis for parallel tasks

Schedulable? (yes/no)

Uniprocessor

analysis for

SS tasks

Se

lf-s

usp

endin

g

Ta

sks

Uniprocessor

analysis for

SS tasks

Uniprocessor

analysis for

SS tasks

Uniprocessor

analysis for

SS tasks

Page 31: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

31Daniel Casini

Overview of the analysis framework

Node-to-core Mapping

Core 1 Core 2 Core 3 Core 4

Para

llelTa

sks

Response-time analysis for parallel tasks

Schedulable? (yes/no)

Uniprocessor

analysis for

SS tasks

Se

lf-s

usp

endin

g

Ta

sks

Uniprocessor

analysis for

SS tasks

Uniprocessor

analysis for

SS tasks

Uniprocessor

analysis for

SS tasks

How to partition nodes to cores?

Page 32: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

32Daniel Casini

Partitioning (meta-)algorithm

IDEA: Analyzing schedulability incrementally, adding one node ata time, and perform schedulability analysis on a subgraph

1. Strategy for ordering tasks

2. Strategy for ordering cores

Inputs: Output:

1. Node partitioning

Example:

Task under analysis

Core 1 Core 2

Core 3 Core 4

Task under analysis (during

partitioning)

Page 33: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

33Daniel Casini

Partitioning (meta-)algorithm

IDEA: Analyzing schedulability incrementally, adding one node ata time, and perform schedulability analysis on a subgraph

1. Strategy for ordering tasks

2. Strategy for ordering cores

Inputs: Output:

1. Node partitioning

Example:

Task under analysis

Core 1 Core 2

Core 3 Core 4

Task under analysis (during

partitioning)

Page 34: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

34Daniel Casini

Partitioning (meta-)algorithm

IDEA: Analyzing schedulability incrementally, adding one node ata time, and perform schedulability analysis on a subgraph

1. Strategy for ordering tasks

2. Strategy for ordering cores

Inputs: Output:

1. Node partitioning

Example:

Task under analysis

Core 1 Core 2

Core 3 Core 4

Task under analysis (during

partitioning)

Page 35: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

35Daniel Casini

Partitioning (meta-)algorithm

IDEA: Analyzing schedulability incrementally, adding one node ata time, and perform schedulability analysis on a subgraph

1. Strategy for ordering tasks

2. Strategy for ordering cores

Inputs: Output:

Example:Core 1 Core 2

Core 3 Core 4

Run analysis for parallel tasks

1. Node partitioning

Task under analysis (during

partitioning)

Task under analysis

Page 36: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

36Daniel Casini

Partitioning (meta-)algorithm

IDEA: Analyzing schedulability incrementally, adding one node ata time, and perform schedulability analysis on a subgraph

1. Strategy for ordering tasks

2. Strategy for ordering cores

Inputs: Output:

Example:Core 1 Core 2

Core 3 Core 4

Run analysis for parallel tasks

Schedulable!

1. Node partitioning

Task under analysis (during

partitioning)

Task under analysis

Page 37: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

37Daniel Casini

Partitioning (meta-)algorithm

IDEA: Analyzing schedulability incrementally, adding one node ata time, and perform schedulability analysis on a subgraph

1. Strategy for ordering tasks

2. Strategy for ordering cores

Inputs: Output:

Example:Core 1 Core 2

Core 3 Core 4

1. Node partitioning

Task under analysis (during

partitioning)

Task under analysis

Page 38: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

38Daniel Casini

Partitioning (meta-)algorithm

IDEA: Analyzing schedulability incrementally, adding one node ata time, and perform schedulability analysis on a subgraph

1. Strategy for ordering tasks

2. Strategy for ordering cores

Inputs: Output:

Example:Core 1 Core 2

Core 3 Core 4

1. Node partitioning

Task under analysis (during

partitioning)

Task under analysis

Page 39: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

39Daniel Casini

Partitioning (meta-)algorithm

IDEA: Analyzing schedulability incrementally, adding one node ata time, and perform schedulability analysis on a subgraph

1. Strategy for ordering tasks

2. Strategy for ordering cores

Inputs: Output:

Example:Core 1 Core 2

Core 3 Core 4

Run analysis for parallel tasks

1. Node partitioning

Task under analysis (during

partitioning)

Task under analysis

Page 40: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

40Daniel Casini

Partitioning (meta-)algorithm

IDEA: Analyzing schedulability incrementally, adding one node ata time, and perform schedulability analysis on a subgraph

1. Strategy for ordering tasks

2. Strategy for ordering cores

Inputs: Output:

Example:Core 1 Core 2

Core 3 Core 4

Run analysis for parallel tasks

Unschedulable!

1. Node partitioning

Task under analysis (during

partitioning)

Task under analysis

Page 41: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

41Daniel Casini

Partitioning (meta-)algorithm

IDEA: Analyzing schedulability incrementally, adding one node ata time, and perform schedulability analysis on a subgraph

1. Strategy for ordering tasks

2. Strategy for ordering cores

Inputs: Output:

Example:Core 1 Core 2

Core 3 Core 4

1. Node partitioning

Task under analysis (during

partitioning)

Task under analysis

Page 42: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

42Daniel Casini

Partitioning (meta-)algorithm

IDEA: Analyzing schedulability incrementally, adding one node ata time, and perform schedulability analysis on a subgraph

1. Strategy for ordering tasks

2. Strategy for ordering cores

Inputs: Output:

Example:Core 1 Core 2

Core 3 Core 4

Run analysis for parallel tasks

1. Node partitioning

Task under analysis (during

partitioning)

Task under analysis

Page 43: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

43Daniel Casini

Partitioning (meta-)algorithm

IDEA: Analyzing schedulability incrementally, adding one node ata time, and perform schedulability analysis on a subgraph

1. Strategy for ordering tasks

2. Strategy for ordering cores

Inputs: Output:

Example:Core 1 Core 2

Core 3 Core 4

Run analysis for parallel tasks

Schedulable!

1. Node partitioning

Task under analysis (during

partitioning)

Task under analysis

Page 44: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

44Daniel Casini

Partitioning (meta-)algorithm

IDEA: Analyzing schedulability incrementally, adding one node ata time, and perform schedulability analysis on a subgraph

1. Strategy for ordering tasks

2. Strategy for ordering cores

Inputs: Output:

Example:Core 1 Core 2

Core 3 Core 4

1. Node partitioning

Task under analysis (during

partitioning)

Task under analysis

Page 45: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

45Daniel Casini

Partitioning (meta-)algorithm

IDEA: Analyzing schedulability incrementally, adding one node ata time, and perform schedulability analysis on a subgraph

1. Strategy for ordering tasks

2. Strategy for ordering cores

Inputs: Output:

Example:Core 1 Core 2

Core 3 Core 4

1. Node partitioning

Task under analysis (during

partitioning)

Task under analysis

Page 46: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

46Daniel Casini

Partitioning (meta-)algorithm

IDEA: Analyzing schedulability incrementally, adding one node ata time, and perform schedulability analysis on a subgraph

1. Strategy for ordering tasks

2. Strategy for ordering cores

Inputs: Output:

Example:Core 1 Core 2

Core 3 Core 4

1. Node partitioning

Task under analysis (during

partitioning)

Task under analysis

Page 47: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

47Daniel Casini

Partitioning (meta-)algorithm

IDEA: Analyzing schedulability incrementally, adding one node ata time, and perform schedulability analysis on a subgraph

1. Strategy for ordering tasks

2. Strategy for ordering cores

Inputs: Output:

Example:Core 1 Core 2

Core 3 Core 4Partitioning completed!

1. Node partitioning

Task under analysis (during

partitioning)

Task under analysis

Page 48: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

48Daniel Casini

Motivation

Experimental Results

Page 49: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

49Daniel Casini

Experimental Study

• Experimental study based on synthetic workload

• We compared against the only previous work targetingnon-preemptive scheduling of parallel tasks, which targetsglobal scheduling (Serrano et al. 2017)

• Same DAG generator used in [Serrano et al. 2017]

• WCETs randomly generated in (0,100] with

uniform distribution

• Tasks utilizations obtained with U-Unifast

• Tasks periods computed as 𝑇𝑖 = 𝑈𝑖 σ𝑛𝑜𝑑𝑒𝑠 𝐶𝑖,𝑗

Page 50: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

50Daniel Casini

Experimental Results

12 tasks, 16 processors

The higher the better

Utilization

Sc

he

du

lab

ility

ratio

Page 51: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

51Daniel Casini

Experimental Results

12 tasks, 16 processors

Utilization

Increasing task-set utilization

Sc

he

du

lab

ility

ratio

Page 52: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

52Daniel Casini

Experimental Results

12 tasks, 16 processors

Sc

he

du

lab

ility

ratio

Improvement up to 100 percentage points

over [Serrano et al. 2017]

Utilization

Page 53: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

53Daniel Casini

Experimental Results

10 tasks, 8 processors

Sc

he

du

lab

ility

ratio

Utilization

Our experimental study revelead a similar trend varying

the number of tasks and processor, e.g.,

Page 54: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

54Daniel Casini

Conclusions

1 Methodology for analyzing non-preemptiveparallel tasks as a set of self-suspending tasks

2Analysis for non-preemptive self-suspending tasks

which analytically dominates the only previous result

3Partitioning algorithm to allocate nodes

to the available processors

4Experimental study to assess the improvement in

terms of schedulability – up to 100 p.p. w.r.t. the onlyexisting previous work for global scheduling

Page 55: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

55Daniel Casini

Future Work

Deeper investigation of partitioning strategies

Improvement in the analysis precision

Integration of communication delays in the analysis

Memory Feasibility Analysis of Parallel Tasks

Running on Scratchpad-Based

Architectures

Daniel Casini, Alessandro Biondi, Geoffrey Nelissen and Giorgio Buttazzo

This morning @ RTSS

Page 56: Partitioned Fixed-Priority Scheduling of Parallel Tasks ...2018.rtss.org/wp-content/uploads/2018/12/11-2.pdf · 12/11/2018  · lf-sks analysis SS Uniprocessor analysis for Uniprocessor

Thank you!Daniel Casini

[email protected]