• Non ci sono risultati.

Supporting Global Resource Sharing in RUN-scheduled Multiprocessor Systems

N/A
N/A
Protected

Academic year: 2021

Condividi "Supporting Global Resource Sharing in RUN-scheduled Multiprocessor Systems"

Copied!
29
0
0

Testo completo

(1)

Supporting Global Resource Sharing in RUN-scheduled Multiprocessor Systems

L.Bonato, E.Mezzetti, T.Vardanega University of Padua, Department of Mathematics

RTNS 2014, October 8-10

sharing resources with RUN RTNS 2014 1 / 24

(2)

Our goal

Goal

Extend RUN (Reduction to UNiprocessor) scheduling algorithm to not-independent tasks

Why RUN?

optimal multiprocessor scheduling algorithm

RUN uses servers, and servers can be convenient: logical packing vs

feasibility packing

(3)

Are servers convenient when sharing resources?

assuming a platform with 2 processors...

sharing resources with RUN RTNS 2014 3 / 24

(4)

Our contribution

SBLP (Server Based Locking Protocol): a locking protocol for RUN.

“servers” as building block for isolating collaborative tasks: avoid bin-packing problem

collaborative tasks

We define two tasks to be collaborative if they belong to the same transitive

closure formed on the relationship of sharing at least one common resource

(5)

RUN: the reduction tree

tasks (T j ) the starting point packed server (S i ) groups several tasks/servers together in a uniprocessor-like fashion

dual server (S i ) represent the idle time of a packed server

sharing resources with RUN RTNS 2014 5 / 24

(6)

RUN executing

Scheduling decision propagates from the root to the leaves. E.g.:

1

Root does not execute (no budget)

2

S

5

does not execute because its parent does not

3

S

5

executes because its dual does not

4

S

1

executes because client of S

5

with earliest deadline

5

S

1

does not execute because its dual does

6

T

1

and T

2

do not execute

because S does not

(7)

RUN executing

...and budgets are consumed during execution...

sharing resources with RUN RTNS 2014 7 / 24

(8)

RUN executing

...and when budgets are ex-

hausted, per-server EDF ta-

kes care to execute some other

client...

(9)

RUN executing

...and so on...

sharing resources with RUN RTNS 2014 9 / 24

(10)

RUN executing

...until budgets are repleni-

shed when servers hit their

deadlines

(11)

RUN+SBLP executing

...now assume tasks T 3 , T 4 , T 5 and T 6 share the same

resource

sharing resources with RUN RTNS 2014 11 / 24

(12)

RUN+SBLP executing

booking the resource

start spinning

some time before 12 both T 3 and T 4 request the resource

T 4 locks the resource

T 3 finds the resource

locked and books the

resource (appends in

resource’s FIFO queue)

since the lock holder is

executing, T 3 starts

spinning while waiting

for the resource to be

released

(13)

RUN+SBLP executing

booking the resource

a scheduling decision preemp- ts T 3 and T 4 .

When T 5 executes and try to lock the already locked resource:

books the resource lends its processor to S 3

whose tasks is holding the resource

sharing resources with RUN RTNS 2014 13 / 24

(14)

RUN+SBLP executing

helping the lock holder

T 5 does not spin because the lock holder is not already exe- cuting, but it lets execute T 4

resource released asap:

no task wastes cpu-time

by spinning if the

holding task is not

making any progress

(15)

RUN+SBLP executing

helping the lock holder

...and since requests must be served in FIFO order, T 3

becomes the new lock holder

sharing resources with RUN RTNS 2014 15 / 24

(16)

RUN+SBLP executing

WCET must account for spinning and helping mechanism normal budget depletion

budgets are consumed as if S 4 would never let other level- 0 servers execute. Increase WCET of tasks to consider:

spinning

execution of critical

section of tasks being

helped

(17)

RUN+SBLP executing

locking the resource

...T 5 uses the resource and completes before its deadline.

Since the resource is free, T 6

can lock it.

sharing resources with RUN RTNS 2014 17 / 24

(18)

RUN+SBLP executing

Then a scheduling decision of

RUN lets S 2 and S 3 execute...

(19)

RUN+SBLP executing

...since T 3 and T 4 already used and released the resour- ce, it’s just normal execution and budget consumption.

sharing resources with RUN RTNS 2014 19 / 24

(20)

RUN+SBLP executing

per-server non-preemptive region

When S 4 must execute, it executes T 6 instead of T 5

each request is a per-server

non-preemptive region

Idea - collaborative tasks will

use the same resource: let’s

avoid unneeded preemptions

(21)

RUN+SBLP executing

server’s budget must account for the delay due to np sections

...but the delay suffered from the tasks in the same server must be considered. To meet the deadlines of tasks

increase budget of servers containing collaborative tasks

sharing resources with RUN RTNS 2014 21 / 24

(22)

RUN+SBLP executing

...and in the meanwhile, T 1

and T 2 (which were not using

the resource) executed, com-

pleted and met their deadlines

without any interference!

(23)

Implementation

SBLP implemented in the plugin of RUN for LITMUS RT non-invasive for kernel primitives

high impact on runtime preemptions and migrations

I

preemptions/migrations may be needed by the helping mechanism

I

height of reduction tree is increased (⇒ more preemptions/migrations)

0 0.5 1 1.5 2 2.5 3 3.5

6 6.2 6.4 6.6 6.8 7 7.2 7.4 7.6

average tree level

system utilization (m=8) RUN RUN+SBLP, 50% collaborative tasks RUN+SBLP, 65% collaborative tasks RUN+SBLP, 80% collaborative tasks

0 2000 4000 6000 8000 10000 12000 14000

6 6.2 6.4 6.6 6.8 7 7.2 7.4 7.6

average cumulative preemptions

system utilization (m=8) RUN RUN+SBLP, 50% collaborative tasks RUN+SBLP, 65% collaborative tasks RUN+SBLP, 80% collaborative tasks

sharing resources with RUN RTNS 2014 23 / 24

(24)

Conclusions

+ RUN can be used with resource-sharing tasks

+ Servers can be useful to overcome the limitations of partitioning while dealing with resources: reduced parallelism and ad-hoc packing

− Increased runtime overhead

(25)

Multiple resources?

What happens if tasks use several shared resources?

protocol does not change

highlights the limit of statically defined servers for collaborative tasks:

decrease parallelism or decrease delay caused by unrelated resources?

sharing resources with RUN RTNS 2014 25 / 24

(26)

Grouping strategies

parallelism = 1 delay = max

parallelism = 1 or 2 delay = min or max

parallelism = 2

delay = min

(27)

Parallelism and delays

System utilization is increased by two distinct amounts:

1

increased WCET of tasks: related to the number of parallel requests

2

increased budget of servers: related to the length of non-preemptive critical section

Which quantity is likely to affect the most the increased system utilization?

sharing resources with RUN RTNS 2014 27 / 24

(28)

Schedulability simulations

Simulations using two packing heuristics for collaborative tasks coarse-grained: to reduce the length of FIFO queue of resources fine-grained: to avoid blocking caused by unrelated resources

⇒ less servers is (generally) better!

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4

0 20 40 60 80 100

demand augmentation factor

% collaborative tasks fine-grained packing

coarse-grained packing

(29)

Nested resources?

Nested resources can be used. How to avoid deadlock?

Ordered access Group lock

Partial group lock: using group lock only for nesting tasks (or better, all nesting tasks in the same server)

sharing resources with RUN RTNS 2014 29 / 24

Riferimenti

Documenti correlati

Su questo sfondo, anche le infiorescenze storiografiche internazionali sulla Commedia dell’Arte sembrano quasi sempre dare per scontato che l’uso della Maschera sia stato

Dopo il taglio e l’allontanamento del marmo tagliato, la parete era ispezionata da operai specializzati (tecchiaioli), che si calavano lungo la superficie del

medical ultrasound, magnetic resonance imaging, dual-mode contrast agents, superparamagnetic iron oxide nanoparticles, polymeric microbubbles.. Author for correspondence:

La degenza post-operatoria, superiore nei pazienti del gruppo RT rispetto ai pazienti del gruppo MT, sottolinea come l'intervento di tiroidectomia totale

I calcoli in condizioni non stazionari (unsteady) fatti in quei punti hanno confermato che il compressore funziona in modo stabile, perciò, si è ritenuto il Simple model

Obiettivi dello studio sono stati: (i) la caratterizzazione molecolare mediante spa typing di isolati nosocomiali di S.aureus; (ii) la tipizzazione della cassetta SCCmec;

1) The first is the “Towards a Digital Dante Encyclopedia” project (2013-2016), an Italian National Research project that aims at building a digital library endowed with

55 pazienti affetti da MICI di età pari o maggiore a 60 in trattamento con farmaci biologici sono stati arruolati in questo studio; 36 di questi pazienti erano maschi e l’età media