12/11/2015 periodic tasks aperiodic tasks · 12/11/2015 1 periodic tasks + aperiodic tasks 2...

32
Periodic tasks + Aperiodic tasks

Upload: others

Post on 24-Jul-2020

41 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 12/11/2015 Periodic tasks Aperiodic tasks · 12/11/2015 1 Periodic tasks + Aperiodic tasks 2 Handling aperiodic tasks Aperiodic tasks are typically activated by the arrival of external

12/11/2015

1

Periodic tasks+

Aperiodic tasks

2

Handling aperiodic tasks

Aperiodic tasks are typically activated by thearrival of external events (notified by interrupts).

From one hand, one objective of the kernel is toreduce the response time of aperiodic tasks(interrupt latency).

On the other hand, aperiodic task executionshould not jeopardize schedulability.

3

Aperiodic Scheduling

1

2

ape2

4

0

8

126

0 4 8 1262 10

C1 = 1

C2 = 3

Consider a simple example with 2 periodic tasks (scheduled by RM) and a single aperiodic job with Ca = 2 arriving at time t = 2:

4

Background service

1

2

ape2

4

0

8

126

0 4 8 1262 10

C1 = 1

C2 = 3

Response Time = 9

If aperiodic jobs are scheduled in background (i.e., during idle times left by periodic tasks) their response times are too long:

5

Immediate service

1

2

ape2

4

0

8

126

0 4 8 1262 10

C1 = 1

C2 = 3

deadline miss

Response Time = 2

On the other hand, if interrupts service routines are scheduled at the highest priority, the other tasks can miss their deadlines:

6

Aperiodic tasks with HARD deadlines must beguaranteed under worst-case conditions.

Off-line guarantee is only possible if we canbound interarrival times (sporadic tasks).

Hence sporadic tasks can be guaranteed asperiodic tasks with Ci = WCETi and Ti = MITi

WCET = Worst-Case Execution TimeMIT = Minimum Interarrival Time

HARD aperiodic tasks

Page 2: 12/11/2015 Periodic tasks Aperiodic tasks · 12/11/2015 1 Periodic tasks + Aperiodic tasks 2 Handling aperiodic tasks Aperiodic tasks are typically activated by the arrival of external

12/11/2015

1

Periodic tasks+

Aperiodic tasks

2

Handling aperiodic tasks

Aperiodic tasks are typically activated by thearrival of external events (notified by interrupts).

From one hand, one objective of the kernel is toreduce the response time of aperiodic tasks(interrupt latency).

On the other hand, aperiodic task executionshould not jeopardize schedulability.

3

Aperiodic Scheduling

1

2

ape2

4

0

8

126

0 4 8 1262 10

C1 = 1

C2 = 3

Consider a simple example with 2 periodic tasks (scheduled by RM) and a single aperiodic job with Ca = 2 arriving at time t = 2:

4

Background service

1

2

ape2

4

0

8

126

0 4 8 1262 10

C1 = 1

C2 = 3

Response Time = 9

If aperiodic jobs are scheduled in background (i.e., during idle times left by periodic tasks) their response times are too long:

5

Immediate service

1

2

ape2

4

0

8

126

0 4 8 1262 10

C1 = 1

C2 = 3

deadline miss

Response Time = 2

On the other hand, if interrupts service routines are scheduled at the highest priority, the other tasks can miss their deadlines:

6

Aperiodic tasks with HARD deadlines must beguaranteed under worst-case conditions.

Off-line guarantee is only possible if we canbound interarrival times (sporadic tasks).

Hence sporadic tasks can be guaranteed asperiodic tasks with Ci = WCETi and Ti = MITi

WCET = Worst-Case Execution TimeMIT = Minimum Interarrival Time

HARD aperiodic tasks

Page 3: 12/11/2015 Periodic tasks Aperiodic tasks · 12/11/2015 1 Periodic tasks + Aperiodic tasks 2 Handling aperiodic tasks Aperiodic tasks are typically activated by the arrival of external

12/11/2015

1

Periodic tasks+

Aperiodic tasks

2

Handling aperiodic tasks

Aperiodic tasks are typically activated by thearrival of external events (notified by interrupts).

From one hand, one objective of the kernel is toreduce the response time of aperiodic tasks(interrupt latency).

On the other hand, aperiodic task executionshould not jeopardize schedulability.

3

Aperiodic Scheduling

1

2

ape2

4

0

8

126

0 4 8 1262 10

C1 = 1

C2 = 3

Consider a simple example with 2 periodic tasks (scheduled by RM) and a single aperiodic job with Ca = 2 arriving at time t = 2:

4

Background service

1

2

ape2

4

0

8

126

0 4 8 1262 10

C1 = 1

C2 = 3

Response Time = 9

If aperiodic jobs are scheduled in background (i.e., during idle times left by periodic tasks) their response times are too long:

5

Immediate service

1

2

ape2

4

0

8

126

0 4 8 1262 10

C1 = 1

C2 = 3

deadline miss

Response Time = 2

On the other hand, if interrupts service routines are scheduled at the highest priority, the other tasks can miss their deadlines:

6

Aperiodic tasks with HARD deadlines must beguaranteed under worst-case conditions.

Off-line guarantee is only possible if we canbound interarrival times (sporadic tasks).

Hence sporadic tasks can be guaranteed asperiodic tasks with Ci = WCETi and Ti = MITi

WCET = Worst-Case Execution TimeMIT = Minimum Interarrival Time

HARD aperiodic tasks

Page 4: 12/11/2015 Periodic tasks Aperiodic tasks · 12/11/2015 1 Periodic tasks + Aperiodic tasks 2 Handling aperiodic tasks Aperiodic tasks are typically activated by the arrival of external

12/11/2015

1

Periodic tasks+

Aperiodic tasks

2

Handling aperiodic tasks

Aperiodic tasks are typically activated by thearrival of external events (notified by interrupts).

From one hand, one objective of the kernel is toreduce the response time of aperiodic tasks(interrupt latency).

On the other hand, aperiodic task executionshould not jeopardize schedulability.

3

Aperiodic Scheduling

1

2

ape2

4

0

8

126

0 4 8 1262 10

C1 = 1

C2 = 3

Consider a simple example with 2 periodic tasks (scheduled by RM) and a single aperiodic job with Ca = 2 arriving at time t = 2:

4

Background service

1

2

ape2

4

0

8

126

0 4 8 1262 10

C1 = 1

C2 = 3

Response Time = 9

If aperiodic jobs are scheduled in background (i.e., during idle times left by periodic tasks) their response times are too long:

5

Immediate service

1

2

ape2

4

0

8

126

0 4 8 1262 10

C1 = 1

C2 = 3

deadline miss

Response Time = 2

On the other hand, if interrupts service routines are scheduled at the highest priority, the other tasks can miss their deadlines:

6

Aperiodic tasks with HARD deadlines must beguaranteed under worst-case conditions.

Off-line guarantee is only possible if we canbound interarrival times (sporadic tasks).

Hence sporadic tasks can be guaranteed asperiodic tasks with Ci = WCETi and Ti = MITi

WCET = Worst-Case Execution TimeMIT = Minimum Interarrival Time

HARD aperiodic tasks

Page 5: 12/11/2015 Periodic tasks Aperiodic tasks · 12/11/2015 1 Periodic tasks + Aperiodic tasks 2 Handling aperiodic tasks Aperiodic tasks are typically activated by the arrival of external

12/11/2015

1

Periodic tasks+

Aperiodic tasks

2

Handling aperiodic tasks

Aperiodic tasks are typically activated by thearrival of external events (notified by interrupts).

From one hand, one objective of the kernel is toreduce the response time of aperiodic tasks(interrupt latency).

On the other hand, aperiodic task executionshould not jeopardize schedulability.

3

Aperiodic Scheduling

1

2

ape2

4

0

8

126

0 4 8 1262 10

C1 = 1

C2 = 3

Consider a simple example with 2 periodic tasks (scheduled by RM) and a single aperiodic job with Ca = 2 arriving at time t = 2:

4

Background service

1

2

ape2

4

0

8

126

0 4 8 1262 10

C1 = 1

C2 = 3

Response Time = 9

If aperiodic jobs are scheduled in background (i.e., during idle times left by periodic tasks) their response times are too long:

5

Immediate service

1

2

ape2

4

0

8

126

0 4 8 1262 10

C1 = 1

C2 = 3

deadline miss

Response Time = 2

On the other hand, if interrupts service routines are scheduled at the highest priority, the other tasks can miss their deadlines:

6

Aperiodic tasks with HARD deadlines must beguaranteed under worst-case conditions.

Off-line guarantee is only possible if we canbound interarrival times (sporadic tasks).

Hence sporadic tasks can be guaranteed asperiodic tasks with Ci = WCETi and Ti = MITi

WCET = Worst-Case Execution TimeMIT = Minimum Interarrival Time

HARD aperiodic tasks

Page 6: 12/11/2015 Periodic tasks Aperiodic tasks · 12/11/2015 1 Periodic tasks + Aperiodic tasks 2 Handling aperiodic tasks Aperiodic tasks are typically activated by the arrival of external

12/11/2015

1

Periodic tasks+

Aperiodic tasks

2

Handling aperiodic tasks

Aperiodic tasks are typically activated by thearrival of external events (notified by interrupts).

From one hand, one objective of the kernel is toreduce the response time of aperiodic tasks(interrupt latency).

On the other hand, aperiodic task executionshould not jeopardize schedulability.

3

Aperiodic Scheduling

1

2

ape2

4

0

8

126

0 4 8 1262 10

C1 = 1

C2 = 3

Consider a simple example with 2 periodic tasks (scheduled by RM) and a single aperiodic job with Ca = 2 arriving at time t = 2:

4

Background service

1

2

ape2

4

0

8

126

0 4 8 1262 10

C1 = 1

C2 = 3

Response Time = 9

If aperiodic jobs are scheduled in background (i.e., during idle times left by periodic tasks) their response times are too long:

5

Immediate service

1

2

ape2

4

0

8

126

0 4 8 1262 10

C1 = 1

C2 = 3

deadline miss

Response Time = 2

On the other hand, if interrupts service routines are scheduled at the highest priority, the other tasks can miss their deadlines:

6

Aperiodic tasks with HARD deadlines must beguaranteed under worst-case conditions.

Off-line guarantee is only possible if we canbound interarrival times (sporadic tasks).

Hence sporadic tasks can be guaranteed asperiodic tasks with Ci = WCETi and Ti = MITi

WCET = Worst-Case Execution TimeMIT = Minimum Interarrival Time

HARD aperiodic tasks

Page 7: 12/11/2015 Periodic tasks Aperiodic tasks · 12/11/2015 1 Periodic tasks + Aperiodic tasks 2 Handling aperiodic tasks Aperiodic tasks are typically activated by the arrival of external

12/11/2015

2

7

SOFT aperiodic tasks

Aperiodic tasks with SOFT deadlines should beexecuted as soon as possible, but withoutjeopardizing HARD tasks.

We may be interested in

minimizing the response time of each aperiodic request

performing an on-line guarantee

How can we achieve these goals?

8

Aperiodic Servers

A server is a kernel activity aimed at controlling theexecution of aperiodic tasks.

Normally, a server is a periodic task having twoparameters:

Cs capacity (or budget)Ts server period

To preserve periodic tasks, no more than Csunits must be executed every period Ts

9

Aperiodic service queue

Service queue

Server

READY queue

periodic/sporadicHARD tasks

aperiodicSOFT tasks

CPU

The server is scheduled as any periodic task.

Priority ties are broken in favor of the server.

Aperiodic tasks can be selected using an arbitraryqueueing discipline.

10

Fixed-priority Servers

Polling Server

Deferrable Server

Sporadic Server

Slack Stealer

11

Dynamic Polling Server

Dynamic Sporadic Server

Total Bandwidth Server

Tunable Bandwidth Server

Constant Bandwidth Server

Dynamic-priority Servers

12

Polling Server (PS)

At the beginning of each period, the budget isrecharged at its maximum value.

Budget is consumed during job execution.

When the server becomes active and there areno pending jobs, Cs is discharged to zero.

When the server becomes active and there arepending jobs, they are served until Cs > 0.

Page 8: 12/11/2015 Periodic tasks Aperiodic tasks · 12/11/2015 1 Periodic tasks + Aperiodic tasks 2 Handling aperiodic tasks Aperiodic tasks are typically activated by the arrival of external

12/11/2015

2

7

SOFT aperiodic tasks

Aperiodic tasks with SOFT deadlines should beexecuted as soon as possible, but withoutjeopardizing HARD tasks.

We may be interested in

minimizing the response time of each aperiodic request

performing an on-line guarantee

How can we achieve these goals?

8

Aperiodic Servers

A server is a kernel activity aimed at controlling theexecution of aperiodic tasks.

Normally, a server is a periodic task having twoparameters:

Cs capacity (or budget)Ts server period

To preserve periodic tasks, no more than Csunits must be executed every period Ts

9

Aperiodic service queue

Service queue

Server

READY queue

periodic/sporadicHARD tasks

aperiodicSOFT tasks

CPU

The server is scheduled as any periodic task.

Priority ties are broken in favor of the server.

Aperiodic tasks can be selected using an arbitraryqueueing discipline.

10

Fixed-priority Servers

Polling Server

Deferrable Server

Sporadic Server

Slack Stealer

11

Dynamic Polling Server

Dynamic Sporadic Server

Total Bandwidth Server

Tunable Bandwidth Server

Constant Bandwidth Server

Dynamic-priority Servers

12

Polling Server (PS)

At the beginning of each period, the budget isrecharged at its maximum value.

Budget is consumed during job execution.

When the server becomes active and there areno pending jobs, Cs is discharged to zero.

When the server becomes active and there arepending jobs, they are served until Cs > 0.

Page 9: 12/11/2015 Periodic tasks Aperiodic tasks · 12/11/2015 1 Periodic tasks + Aperiodic tasks 2 Handling aperiodic tasks Aperiodic tasks are typically activated by the arrival of external

12/11/2015

2

7

SOFT aperiodic tasks

Aperiodic tasks with SOFT deadlines should beexecuted as soon as possible, but withoutjeopardizing HARD tasks.

We may be interested in

minimizing the response time of each aperiodic request

performing an on-line guarantee

How can we achieve these goals?

8

Aperiodic Servers

A server is a kernel activity aimed at controlling theexecution of aperiodic tasks.

Normally, a server is a periodic task having twoparameters:

Cs capacity (or budget)Ts server period

To preserve periodic tasks, no more than Csunits must be executed every period Ts

9

Aperiodic service queue

Service queue

Server

READY queue

periodic/sporadicHARD tasks

aperiodicSOFT tasks

CPU

The server is scheduled as any periodic task.

Priority ties are broken in favor of the server.

Aperiodic tasks can be selected using an arbitraryqueueing discipline.

10

Fixed-priority Servers

Polling Server

Deferrable Server

Sporadic Server

Slack Stealer

11

Dynamic Polling Server

Dynamic Sporadic Server

Total Bandwidth Server

Tunable Bandwidth Server

Constant Bandwidth Server

Dynamic-priority Servers

12

Polling Server (PS)

At the beginning of each period, the budget isrecharged at its maximum value.

Budget is consumed during job execution.

When the server becomes active and there areno pending jobs, Cs is discharged to zero.

When the server becomes active and there arepending jobs, they are served until Cs > 0.

Page 10: 12/11/2015 Periodic tasks Aperiodic tasks · 12/11/2015 1 Periodic tasks + Aperiodic tasks 2 Handling aperiodic tasks Aperiodic tasks are typically activated by the arrival of external

12/11/2015

2

7

SOFT aperiodic tasks

Aperiodic tasks with SOFT deadlines should beexecuted as soon as possible, but withoutjeopardizing HARD tasks.

We may be interested in

minimizing the response time of each aperiodic request

performing an on-line guarantee

How can we achieve these goals?

8

Aperiodic Servers

A server is a kernel activity aimed at controlling theexecution of aperiodic tasks.

Normally, a server is a periodic task having twoparameters:

Cs capacity (or budget)Ts server period

To preserve periodic tasks, no more than Csunits must be executed every period Ts

9

Aperiodic service queue

Service queue

Server

READY queue

periodic/sporadicHARD tasks

aperiodicSOFT tasks

CPU

The server is scheduled as any periodic task.

Priority ties are broken in favor of the server.

Aperiodic tasks can be selected using an arbitraryqueueing discipline.

10

Fixed-priority Servers

Polling Server

Deferrable Server

Sporadic Server

Slack Stealer

11

Dynamic Polling Server

Dynamic Sporadic Server

Total Bandwidth Server

Tunable Bandwidth Server

Constant Bandwidth Server

Dynamic-priority Servers

12

Polling Server (PS)

At the beginning of each period, the budget isrecharged at its maximum value.

Budget is consumed during job execution.

When the server becomes active and there areno pending jobs, Cs is discharged to zero.

When the server becomes active and there arepending jobs, they are served until Cs > 0.

Page 11: 12/11/2015 Periodic tasks Aperiodic tasks · 12/11/2015 1 Periodic tasks + Aperiodic tasks 2 Handling aperiodic tasks Aperiodic tasks are typically activated by the arrival of external

12/11/2015

2

7

SOFT aperiodic tasks

Aperiodic tasks with SOFT deadlines should beexecuted as soon as possible, but withoutjeopardizing HARD tasks.

We may be interested in

minimizing the response time of each aperiodic request

performing an on-line guarantee

How can we achieve these goals?

8

Aperiodic Servers

A server is a kernel activity aimed at controlling theexecution of aperiodic tasks.

Normally, a server is a periodic task having twoparameters:

Cs capacity (or budget)Ts server period

To preserve periodic tasks, no more than Csunits must be executed every period Ts

9

Aperiodic service queue

Service queue

Server

READY queue

periodic/sporadicHARD tasks

aperiodicSOFT tasks

CPU

The server is scheduled as any periodic task.

Priority ties are broken in favor of the server.

Aperiodic tasks can be selected using an arbitraryqueueing discipline.

10

Fixed-priority Servers

Polling Server

Deferrable Server

Sporadic Server

Slack Stealer

11

Dynamic Polling Server

Dynamic Sporadic Server

Total Bandwidth Server

Tunable Bandwidth Server

Constant Bandwidth Server

Dynamic-priority Servers

12

Polling Server (PS)

At the beginning of each period, the budget isrecharged at its maximum value.

Budget is consumed during job execution.

When the server becomes active and there areno pending jobs, Cs is discharged to zero.

When the server becomes active and there arepending jobs, they are served until Cs > 0.

Page 12: 12/11/2015 Periodic tasks Aperiodic tasks · 12/11/2015 1 Periodic tasks + Aperiodic tasks 2 Handling aperiodic tasks Aperiodic tasks are typically activated by the arrival of external

12/11/2015

2

7

SOFT aperiodic tasks

Aperiodic tasks with SOFT deadlines should beexecuted as soon as possible, but withoutjeopardizing HARD tasks.

We may be interested in

minimizing the response time of each aperiodic request

performing an on-line guarantee

How can we achieve these goals?

8

Aperiodic Servers

A server is a kernel activity aimed at controlling theexecution of aperiodic tasks.

Normally, a server is a periodic task having twoparameters:

Cs capacity (or budget)Ts server period

To preserve periodic tasks, no more than Csunits must be executed every period Ts

9

Aperiodic service queue

Service queue

Server

READY queue

periodic/sporadicHARD tasks

aperiodicSOFT tasks

CPU

The server is scheduled as any periodic task.

Priority ties are broken in favor of the server.

Aperiodic tasks can be selected using an arbitraryqueueing discipline.

10

Fixed-priority Servers

Polling Server

Deferrable Server

Sporadic Server

Slack Stealer

11

Dynamic Polling Server

Dynamic Sporadic Server

Total Bandwidth Server

Tunable Bandwidth Server

Constant Bandwidth Server

Dynamic-priority Servers

12

Polling Server (PS)

At the beginning of each period, the budget isrecharged at its maximum value.

Budget is consumed during job execution.

When the server becomes active and there areno pending jobs, Cs is discharged to zero.

When the server becomes active and there arepending jobs, they are served until Cs > 0.

Page 13: 12/11/2015 Periodic tasks Aperiodic tasks · 12/11/2015 1 Periodic tasks + Aperiodic tasks 2 Handling aperiodic tasks Aperiodic tasks are typically activated by the arrival of external

12/11/2015

3

13

Background service

1

2

ape2

4

0

8

126

0 4 8 1262 10

C1 = 1

C2 = 3

Response Time = 9

Let’s take the previous example:

14

1

2

ape2

4

0

8

126

0 4 8 1262 10

C1 = 1

C2 = 3

RM + Polling Server

0

PSCs = 1Ts = 4

Response Time = 7

4 8 12

15

Computing Ulub for RM + PST1 < Ti < 2T1

Cs = T1 – Ts

1

2

Cs Cs

C1Ts 2Ts

C2

n-1

0

Cn–1

nCn

T1

T2

Tn–1

Tn

•••

C1 = T2 – T1

C2 = T3 – T2

Cn–1 = Tn – Tn–1

Ts

1n

1kkssn CCTC

PS

= 2Ts – Tn

16

n

ns

n

nnsub T

TT

T

TT

T

TTUU

2

1

1

1

12

nT

T

T

T

T

TUU

n

s

n

nsub

2

11

2

Definingi

ii T

TR 1 we can write:

nT

TRUU

n

sn

iisub

21

1

Computing Ulub for RM + PS

17

Note that

nP

KRUU

n

iisub

1

1

1

1

1 T

TRP n

n

ii

hence:

nT

TRUU

n

sn

iisub

21

1

Cs = T1 – Ts 11 ss

UT

T

PUT

T

T

T

T

T

sn

s

n

s 1

1

222 1

1

1

2

sUK

Computing Ulub for RM + PS

18

nP

KRUU

n

iisub

1

1

Minimizing with respect to Ri we have:

01

PR

K

R

U

ii

ub for ni KR /1

Hence: 1/1lub n

sPSRM KnUU

Computing Ulub for RM + PS

Page 14: 12/11/2015 Periodic tasks Aperiodic tasks · 12/11/2015 1 Periodic tasks + Aperiodic tasks 2 Handling aperiodic tasks Aperiodic tasks are typically activated by the arrival of external

12/11/2015

3

13

Background service

1

2

ape2

4

0

8

126

0 4 8 1262 10

C1 = 1

C2 = 3

Response Time = 9

Let’s take the previous example:

14

1

2

ape2

4

0

8

126

0 4 8 1262 10

C1 = 1

C2 = 3

RM + Polling Server

0

PSCs = 1Ts = 4

Response Time = 7

4 8 12

15

Computing Ulub for RM + PST1 < Ti < 2T1

Cs = T1 – Ts

1

2

Cs Cs

C1Ts 2Ts

C2

n-1

0

Cn–1

nCn

T1

T2

Tn–1

Tn

•••

C1 = T2 – T1

C2 = T3 – T2

Cn–1 = Tn – Tn–1

Ts

1n

1kkssn CCTC

PS

= 2Ts – Tn

16

n

ns

n

nnsub T

TT

T

TT

T

TTUU

2

1

1

1

12

nT

T

T

T

T

TUU

n

s

n

nsub

2

11

2

Definingi

ii T

TR 1 we can write:

nT

TRUU

n

sn

iisub

21

1

Computing Ulub for RM + PS

17

Note that

nP

KRUU

n

iisub

1

1

1

1

1 T

TRP n

n

ii

hence:

nT

TRUU

n

sn

iisub

21

1

Cs = T1 – Ts 11 ss

UT

T

PUT

T

T

T

T

T

sn

s

n

s 1

1

222 1

1

1

2

sUK

Computing Ulub for RM + PS

18

nP

KRUU

n

iisub

1

1

Minimizing with respect to Ri we have:

01

PR

K

R

U

ii

ub for ni KR /1

Hence: 1/1lub n

sPSRM KnUU

Computing Ulub for RM + PS

Page 15: 12/11/2015 Periodic tasks Aperiodic tasks · 12/11/2015 1 Periodic tasks + Aperiodic tasks 2 Handling aperiodic tasks Aperiodic tasks are typically activated by the arrival of external

12/11/2015

3

13

Background service

1

2

ape2

4

0

8

126

0 4 8 1262 10

C1 = 1

C2 = 3

Response Time = 9

Let’s take the previous example:

14

1

2

ape2

4

0

8

126

0 4 8 1262 10

C1 = 1

C2 = 3

RM + Polling Server

0

PSCs = 1Ts = 4

Response Time = 7

4 8 12

15

Computing Ulub for RM + PST1 < Ti < 2T1

Cs = T1 – Ts

1

2

Cs Cs

C1Ts 2Ts

C2

n-1

0

Cn–1

nCn

T1

T2

Tn–1

Tn

•••

C1 = T2 – T1

C2 = T3 – T2

Cn–1 = Tn – Tn–1

Ts

1n

1kkssn CCTC

PS

= 2Ts – Tn

16

n

ns

n

nnsub T

TT

T

TT

T

TTUU

2

1

1

1

12

nT

T

T

T

T

TUU

n

s

n

nsub

2

11

2

Definingi

ii T

TR 1 we can write:

nT

TRUU

n

sn

iisub

21

1

Computing Ulub for RM + PS

17

Note that

nP

KRUU

n

iisub

1

1

1

1

1 T

TRP n

n

ii

hence:

nT

TRUU

n

sn

iisub

21

1

Cs = T1 – Ts 11 ss

UT

T

PUT

T

T

T

T

T

sn

s

n

s 1

1

222 1

1

1

2

sUK

Computing Ulub for RM + PS

18

nP

KRUU

n

iisub

1

1

Minimizing with respect to Ri we have:

01

PR

K

R

U

ii

ub for ni KR /1

Hence: 1/1lub n

sPSRM KnUU

Computing Ulub for RM + PS

Page 16: 12/11/2015 Periodic tasks Aperiodic tasks · 12/11/2015 1 Periodic tasks + Aperiodic tasks 2 Handling aperiodic tasks Aperiodic tasks are typically activated by the arrival of external

12/11/2015

3

13

Background service

1

2

ape2

4

0

8

126

0 4 8 1262 10

C1 = 1

C2 = 3

Response Time = 9

Let’s take the previous example:

14

1

2

ape2

4

0

8

126

0 4 8 1262 10

C1 = 1

C2 = 3

RM + Polling Server

0

PSCs = 1Ts = 4

Response Time = 7

4 8 12

15

Computing Ulub for RM + PST1 < Ti < 2T1

Cs = T1 – Ts

1

2

Cs Cs

C1Ts 2Ts

C2

n-1

0

Cn–1

nCn

T1

T2

Tn–1

Tn

•••

C1 = T2 – T1

C2 = T3 – T2

Cn–1 = Tn – Tn–1

Ts

1n

1kkssn CCTC

PS

= 2Ts – Tn

16

n

ns

n

nnsub T

TT

T

TT

T

TTUU

2

1

1

1

12

nT

T

T

T

T

TUU

n

s

n

nsub

2

11

2

Definingi

ii T

TR 1 we can write:

nT

TRUU

n

sn

iisub

21

1

Computing Ulub for RM + PS

17

Note that

nP

KRUU

n

iisub

1

1

1

1

1 T

TRP n

n

ii

hence:

nT

TRUU

n

sn

iisub

21

1

Cs = T1 – Ts 11 ss

UT

T

PUT

T

T

T

T

T

sn

s

n

s 1

1

222 1

1

1

2

sUK

Computing Ulub for RM + PS

18

nP

KRUU

n

iisub

1

1

Minimizing with respect to Ri we have:

01

PR

K

R

U

ii

ub for ni KR /1

Hence: 1/1lub n

sPSRM KnUU

Computing Ulub for RM + PS

Page 17: 12/11/2015 Periodic tasks Aperiodic tasks · 12/11/2015 1 Periodic tasks + Aperiodic tasks 2 Handling aperiodic tasks Aperiodic tasks are typically activated by the arrival of external

12/11/2015

3

13

Background service

1

2

ape2

4

0

8

126

0 4 8 1262 10

C1 = 1

C2 = 3

Response Time = 9

Let’s take the previous example:

14

1

2

ape2

4

0

8

126

0 4 8 1262 10

C1 = 1

C2 = 3

RM + Polling Server

0

PSCs = 1Ts = 4

Response Time = 7

4 8 12

15

Computing Ulub for RM + PST1 < Ti < 2T1

Cs = T1 – Ts

1

2

Cs Cs

C1Ts 2Ts

C2

n-1

0

Cn–1

nCn

T1

T2

Tn–1

Tn

•••

C1 = T2 – T1

C2 = T3 – T2

Cn–1 = Tn – Tn–1

Ts

1n

1kkssn CCTC

PS

= 2Ts – Tn

16

n

ns

n

nnsub T

TT

T

TT

T

TTUU

2

1

1

1

12

nT

T

T

T

T

TUU

n

s

n

nsub

2

11

2

Definingi

ii T

TR 1 we can write:

nT

TRUU

n

sn

iisub

21

1

Computing Ulub for RM + PS

17

Note that

nP

KRUU

n

iisub

1

1

1

1

1 T

TRP n

n

ii

hence:

nT

TRUU

n

sn

iisub

21

1

Cs = T1 – Ts 11 ss

UT

T

PUT

T

T

T

T

T

sn

s

n

s 1

1

222 1

1

1

2

sUK

Computing Ulub for RM + PS

18

nP

KRUU

n

iisub

1

1

Minimizing with respect to Ri we have:

01

PR

K

R

U

ii

ub for ni KR /1

Hence: 1/1lub n

sPSRM KnUU

Computing Ulub for RM + PS

Page 18: 12/11/2015 Periodic tasks Aperiodic tasks · 12/11/2015 1 Periodic tasks + Aperiodic tasks 2 Handling aperiodic tasks Aperiodic tasks are typically activated by the arrival of external

12/11/2015

3

13

Background service

1

2

ape2

4

0

8

126

0 4 8 1262 10

C1 = 1

C2 = 3

Response Time = 9

Let’s take the previous example:

14

1

2

ape2

4

0

8

126

0 4 8 1262 10

C1 = 1

C2 = 3

RM + Polling Server

0

PSCs = 1Ts = 4

Response Time = 7

4 8 12

15

Computing Ulub for RM + PST1 < Ti < 2T1

Cs = T1 – Ts

1

2

Cs Cs

C1Ts 2Ts

C2

n-1

0

Cn–1

nCn

T1

T2

Tn–1

Tn

•••

C1 = T2 – T1

C2 = T3 – T2

Cn–1 = Tn – Tn–1

Ts

1n

1kkssn CCTC

PS

= 2Ts – Tn

16

n

ns

n

nnsub T

TT

T

TT

T

TTUU

2

1

1

1

12

nT

T

T

T

T

TUU

n

s

n

nsub

2

11

2

Definingi

ii T

TR 1 we can write:

nT

TRUU

n

sn

iisub

21

1

Computing Ulub for RM + PS

17

Note that

nP

KRUU

n

iisub

1

1

1

1

1 T

TRP n

n

ii

hence:

nT

TRUU

n

sn

iisub

21

1

Cs = T1 – Ts 11 ss

UT

T

PUT

T

T

T

T

T

sn

s

n

s 1

1

222 1

1

1

2

sUK

Computing Ulub for RM + PS

18

nP

KRUU

n

iisub

1

1

Minimizing with respect to Ri we have:

01

PR

K

R

U

ii

ub for ni KR /1

Hence: 1/1lub n

sPSRM KnUU

Computing Ulub for RM + PS

Page 19: 12/11/2015 Periodic tasks Aperiodic tasks · 12/11/2015 1 Periodic tasks + Aperiodic tasks 2 Handling aperiodic tasks Aperiodic tasks are typically activated by the arrival of external

12/11/2015

4

19

PS properties

In the worst-case, the PS behaves as a periodictask with utilization Us = Cs/Ts

Aperiodic tasks execute at the highest priority ifTs = min(T1, … , Tn).

Liu & Layland analysis gives that:

11

2)(

/1

lub

n

ss

PSRM

UnUnU

20

RM + PS schedulability

Us

0 1

1

ln2

1

2ln)(lub

ss

PSRM

UUnU

)1()( /1lub n

sPSRM KnUnU

1

2

sUK

21

1

2)1(

1

s

n

ii U

U

Analysis with Hyperbolic Bound

A set of periodic tasks is schedulable by Rate Monotonic in the presence of a Polling Server with utilization Us if

n

iiUP

1

)1(Defining

the maximum server utilization that guarantees theschedulability of the periodic task set is

12max P

U s )( ssaaaa CTCR 22

Response time under PS

Consider a PS running at the highest priority and anaperiodic job arriving when the server is idle:

ape

initial delay # full service periods final chunk

Ca

(Cs, Ts)

ra

a = Ts ra

ra

Ts

1s

aa C

C saaa CC

23

Deferrable Server (DS)

Is similar to the PS, but the budget is notdischarged if there are no pending requests.

Keeping the budget improves responsiveness,since jobs can be served within a period.

ape

0 4 8 1262 10

0 4 8

DSCs = 1Ts = 4

1224

RM + Deferrable Server

1

2

ape2

4

0

8

126

0 4 8 1262 10

C1 = 2

C2 = 1

0 4 12

DSCs = 1Ts = 5

Response Time = 3

8

Page 20: 12/11/2015 Periodic tasks Aperiodic tasks · 12/11/2015 1 Periodic tasks + Aperiodic tasks 2 Handling aperiodic tasks Aperiodic tasks are typically activated by the arrival of external

12/11/2015

4

19

PS properties

In the worst-case, the PS behaves as a periodictask with utilization Us = Cs/Ts

Aperiodic tasks execute at the highest priority ifTs = min(T1, … , Tn).

Liu & Layland analysis gives that:

11

2)(

/1

lub

n

ss

PSRM

UnUnU

20

RM + PS schedulability

Us

0 1

1

ln2

1

2ln)(lub

ss

PSRM

UUnU

)1()( /1lub n

sPSRM KnUnU

1

2

sUK

21

1

2)1(

1

s

n

ii U

U

Analysis with Hyperbolic Bound

A set of periodic tasks is schedulable by Rate Monotonic in the presence of a Polling Server with utilization Us if

n

iiUP

1

)1(Defining

the maximum server utilization that guarantees theschedulability of the periodic task set is

12max P

U s )( ssaaaa CTCR 22

Response time under PS

Consider a PS running at the highest priority and anaperiodic job arriving when the server is idle:

ape

initial delay # full service periods final chunk

Ca

(Cs, Ts)

ra

a = Ts ra

ra

Ts

1s

aa C

C saaa CC

23

Deferrable Server (DS)

Is similar to the PS, but the budget is notdischarged if there are no pending requests.

Keeping the budget improves responsiveness,since jobs can be served within a period.

ape

0 4 8 1262 10

0 4 8

DSCs = 1Ts = 4

1224

RM + Deferrable Server

1

2

ape2

4

0

8

126

0 4 8 1262 10

C1 = 2

C2 = 1

0 4 12

DSCs = 1Ts = 5

Response Time = 3

8

Page 21: 12/11/2015 Periodic tasks Aperiodic tasks · 12/11/2015 1 Periodic tasks + Aperiodic tasks 2 Handling aperiodic tasks Aperiodic tasks are typically activated by the arrival of external

12/11/2015

4

19

PS properties

In the worst-case, the PS behaves as a periodictask with utilization Us = Cs/Ts

Aperiodic tasks execute at the highest priority ifTs = min(T1, … , Tn).

Liu & Layland analysis gives that:

11

2)(

/1

lub

n

ss

PSRM

UnUnU

20

RM + PS schedulability

Us

0 1

1

ln2

1

2ln)(lub

ss

PSRM

UUnU

)1()( /1lub n

sPSRM KnUnU

1

2

sUK

21

1

2)1(

1

s

n

ii U

U

Analysis with Hyperbolic Bound

A set of periodic tasks is schedulable by Rate Monotonic in the presence of a Polling Server with utilization Us if

n

iiUP

1

)1(Defining

the maximum server utilization that guarantees theschedulability of the periodic task set is

12max P

U s )( ssaaaa CTCR 22

Response time under PS

Consider a PS running at the highest priority and anaperiodic job arriving when the server is idle:

ape

initial delay # full service periods final chunk

Ca

(Cs, Ts)

ra

a = Ts ra

ra

Ts

1s

aa C

C saaa CC

23

Deferrable Server (DS)

Is similar to the PS, but the budget is notdischarged if there are no pending requests.

Keeping the budget improves responsiveness,since jobs can be served within a period.

ape

0 4 8 1262 10

0 4 8

DSCs = 1Ts = 4

1224

RM + Deferrable Server

1

2

ape2

4

0

8

126

0 4 8 1262 10

C1 = 2

C2 = 1

0 4 12

DSCs = 1Ts = 5

Response Time = 3

8

Page 22: 12/11/2015 Periodic tasks Aperiodic tasks · 12/11/2015 1 Periodic tasks + Aperiodic tasks 2 Handling aperiodic tasks Aperiodic tasks are typically activated by the arrival of external

12/11/2015

4

19

PS properties

In the worst-case, the PS behaves as a periodictask with utilization Us = Cs/Ts

Aperiodic tasks execute at the highest priority ifTs = min(T1, … , Tn).

Liu & Layland analysis gives that:

11

2)(

/1

lub

n

ss

PSRM

UnUnU

20

RM + PS schedulability

Us

0 1

1

ln2

1

2ln)(lub

ss

PSRM

UUnU

)1()( /1lub n

sPSRM KnUnU

1

2

sUK

21

1

2)1(

1

s

n

ii U

U

Analysis with Hyperbolic Bound

A set of periodic tasks is schedulable by Rate Monotonic in the presence of a Polling Server with utilization Us if

n

iiUP

1

)1(Defining

the maximum server utilization that guarantees theschedulability of the periodic task set is

12max P

U s )( ssaaaa CTCR 22

Response time under PS

Consider a PS running at the highest priority and anaperiodic job arriving when the server is idle:

ape

initial delay # full service periods final chunk

Ca

(Cs, Ts)

ra

a = Ts ra

ra

Ts

1s

aa C

C saaa CC

23

Deferrable Server (DS)

Is similar to the PS, but the budget is notdischarged if there are no pending requests.

Keeping the budget improves responsiveness,since jobs can be served within a period.

ape

0 4 8 1262 10

0 4 8

DSCs = 1Ts = 4

1224

RM + Deferrable Server

1

2

ape2

4

0

8

126

0 4 8 1262 10

C1 = 2

C2 = 1

0 4 12

DSCs = 1Ts = 5

Response Time = 3

8

Page 23: 12/11/2015 Periodic tasks Aperiodic tasks · 12/11/2015 1 Periodic tasks + Aperiodic tasks 2 Handling aperiodic tasks Aperiodic tasks are typically activated by the arrival of external

12/11/2015

4

19

PS properties

In the worst-case, the PS behaves as a periodictask with utilization Us = Cs/Ts

Aperiodic tasks execute at the highest priority ifTs = min(T1, … , Tn).

Liu & Layland analysis gives that:

11

2)(

/1

lub

n

ss

PSRM

UnUnU

20

RM + PS schedulability

Us

0 1

1

ln2

1

2ln)(lub

ss

PSRM

UUnU

)1()( /1lub n

sPSRM KnUnU

1

2

sUK

21

1

2)1(

1

s

n

ii U

U

Analysis with Hyperbolic Bound

A set of periodic tasks is schedulable by Rate Monotonic in the presence of a Polling Server with utilization Us if

n

iiUP

1

)1(Defining

the maximum server utilization that guarantees theschedulability of the periodic task set is

12max P

U s )( ssaaaa CTCR 22

Response time under PS

Consider a PS running at the highest priority and anaperiodic job arriving when the server is idle:

ape

initial delay # full service periods final chunk

Ca

(Cs, Ts)

ra

a = Ts ra

ra

Ts

1s

aa C

C saaa CC

23

Deferrable Server (DS)

Is similar to the PS, but the budget is notdischarged if there are no pending requests.

Keeping the budget improves responsiveness,since jobs can be served within a period.

ape

0 4 8 1262 10

0 4 8

DSCs = 1Ts = 4

1224

RM + Deferrable Server

1

2

ape2

4

0

8

126

0 4 8 1262 10

C1 = 2

C2 = 1

0 4 12

DSCs = 1Ts = 5

Response Time = 3

8

Page 24: 12/11/2015 Periodic tasks Aperiodic tasks · 12/11/2015 1 Periodic tasks + Aperiodic tasks 2 Handling aperiodic tasks Aperiodic tasks are typically activated by the arrival of external

12/11/2015

4

19

PS properties

In the worst-case, the PS behaves as a periodictask with utilization Us = Cs/Ts

Aperiodic tasks execute at the highest priority ifTs = min(T1, … , Tn).

Liu & Layland analysis gives that:

11

2)(

/1

lub

n

ss

PSRM

UnUnU

20

RM + PS schedulability

Us

0 1

1

ln2

1

2ln)(lub

ss

PSRM

UUnU

)1()( /1lub n

sPSRM KnUnU

1

2

sUK

21

1

2)1(

1

s

n

ii U

U

Analysis with Hyperbolic Bound

A set of periodic tasks is schedulable by Rate Monotonic in the presence of a Polling Server with utilization Us if

n

iiUP

1

)1(Defining

the maximum server utilization that guarantees theschedulability of the periodic task set is

12max P

U s )( ssaaaa CTCR 22

Response time under PS

Consider a PS running at the highest priority and anaperiodic job arriving when the server is idle:

ape

initial delay # full service periods final chunk

Ca

(Cs, Ts)

ra

a = Ts ra

ra

Ts

1s

aa C

C saaa CC

23

Deferrable Server (DS)

Is similar to the PS, but the budget is notdischarged if there are no pending requests.

Keeping the budget improves responsiveness,since jobs can be served within a period.

ape

0 4 8 1262 10

0 4 8

DSCs = 1Ts = 4

1224

RM + Deferrable Server

1

2

ape2

4

0

8

126

0 4 8 1262 10

C1 = 2

C2 = 1

0 4 12

DSCs = 1Ts = 5

Response Time = 3

8

Page 25: 12/11/2015 Periodic tasks Aperiodic tasks · 12/11/2015 1 Periodic tasks + Aperiodic tasks 2 Handling aperiodic tasks Aperiodic tasks are typically activated by the arrival of external

12/11/2015

5

25

However, DS does not behaves like a periodic task and it ismore invasive than PS.

Keeping the budget decreases the utilization bound.

ape

0 4 8 1262 10

0 4 8

DSCs = 1Ts = 4

Deferrable Server (DS)

There can be two serverexecutions close to each other

26

0 4 8

DSCs = 2Ts = 4

0 4 8 1262 10

0 5 10

1

2

0 4 8 1262 10

0 5 10

ape

2

deadlinemiss

Deferrable Server (DS)

27

Analysis of RM + DS

112

2)(

1

lub

n

s

ss

DSRM

U

UnUnU

DS

1

Cs Cs

C1Ts +Cs 2Ts+Cs

2C2

T1

Cs

T2

2Cs = T1 – Ts

C1 = T2 – T1

C2 = T3 – T2

C1

C2

28

Us

0 1

1

ln2

)(lub nU DSRM

PS

DS

)1()( /1lub n

sPSRM KnUnU

1

2

sPS U

K12

2

s

sDS U

UK

RM + DS schedulability

29

12

2)1(

1

s

sn

ii U

UU

Analysis with Hyperbolic Bound

A set of periodic tasks is schedulable by Rate Monotonic in the presence of a Deferrable Server with utilization Us if

n

iiUP

1

)1(Defining

the maximum server utilization that guarantees theschedulability of the periodic task set is

12

2max

P

PU s

30

Response time under DS

Consider a DS running at the highest priority and anaperiodic job arriving when the server is idle:

ape

full service periods final chunk

Ca

(Cs, Ts)

asaaa TR

a = Ts ra

ra

Ts

1

s

saa C

CC sasaa CCC

initial delay

ra

Page 26: 12/11/2015 Periodic tasks Aperiodic tasks · 12/11/2015 1 Periodic tasks + Aperiodic tasks 2 Handling aperiodic tasks Aperiodic tasks are typically activated by the arrival of external

12/11/2015

5

25

However, DS does not behaves like a periodic task and it ismore invasive than PS.

Keeping the budget decreases the utilization bound.

ape

0 4 8 1262 10

0 4 8

DSCs = 1Ts = 4

Deferrable Server (DS)

There can be two serverexecutions close to each other

26

0 4 8

DSCs = 2Ts = 4

0 4 8 1262 10

0 5 10

1

2

0 4 8 1262 10

0 5 10

ape

2

deadlinemiss

Deferrable Server (DS)

27

Analysis of RM + DS

112

2)(

1

lub

n

s

ss

DSRM

U

UnUnU

DS

1

Cs Cs

C1Ts +Cs 2Ts+Cs

2C2

T1

Cs

T2

2Cs = T1 – Ts

C1 = T2 – T1

C2 = T3 – T2

C1

C2

28

Us

0 1

1

ln2

)(lub nU DSRM

PS

DS

)1()( /1lub n

sPSRM KnUnU

1

2

sPS U

K12

2

s

sDS U

UK

RM + DS schedulability

29

12

2)1(

1

s

sn

ii U

UU

Analysis with Hyperbolic Bound

A set of periodic tasks is schedulable by Rate Monotonic in the presence of a Deferrable Server with utilization Us if

n

iiUP

1

)1(Defining

the maximum server utilization that guarantees theschedulability of the periodic task set is

12

2max

P

PU s

30

Response time under DS

Consider a DS running at the highest priority and anaperiodic job arriving when the server is idle:

ape

full service periods final chunk

Ca

(Cs, Ts)

asaaa TR

a = Ts ra

ra

Ts

1

s

saa C

CC sasaa CCC

initial delay

ra

Page 27: 12/11/2015 Periodic tasks Aperiodic tasks · 12/11/2015 1 Periodic tasks + Aperiodic tasks 2 Handling aperiodic tasks Aperiodic tasks are typically activated by the arrival of external

12/11/2015

5

25

However, DS does not behaves like a periodic task and it ismore invasive than PS.

Keeping the budget decreases the utilization bound.

ape

0 4 8 1262 10

0 4 8

DSCs = 1Ts = 4

Deferrable Server (DS)

There can be two serverexecutions close to each other

26

0 4 8

DSCs = 2Ts = 4

0 4 8 1262 10

0 5 10

1

2

0 4 8 1262 10

0 5 10

ape

2

deadlinemiss

Deferrable Server (DS)

27

Analysis of RM + DS

112

2)(

1

lub

n

s

ss

DSRM

U

UnUnU

DS

1

Cs Cs

C1Ts +Cs 2Ts+Cs

2C2

T1

Cs

T2

2Cs = T1 – Ts

C1 = T2 – T1

C2 = T3 – T2

C1

C2

28

Us

0 1

1

ln2

)(lub nU DSRM

PS

DS

)1()( /1lub n

sPSRM KnUnU

1

2

sPS U

K12

2

s

sDS U

UK

RM + DS schedulability

29

12

2)1(

1

s

sn

ii U

UU

Analysis with Hyperbolic Bound

A set of periodic tasks is schedulable by Rate Monotonic in the presence of a Deferrable Server with utilization Us if

n

iiUP

1

)1(Defining

the maximum server utilization that guarantees theschedulability of the periodic task set is

12

2max

P

PU s

30

Response time under DS

Consider a DS running at the highest priority and anaperiodic job arriving when the server is idle:

ape

full service periods final chunk

Ca

(Cs, Ts)

asaaa TR

a = Ts ra

ra

Ts

1

s

saa C

CC sasaa CCC

initial delay

ra

Page 28: 12/11/2015 Periodic tasks Aperiodic tasks · 12/11/2015 1 Periodic tasks + Aperiodic tasks 2 Handling aperiodic tasks Aperiodic tasks are typically activated by the arrival of external

12/11/2015

5

25

However, DS does not behaves like a periodic task and it ismore invasive than PS.

Keeping the budget decreases the utilization bound.

ape

0 4 8 1262 10

0 4 8

DSCs = 1Ts = 4

Deferrable Server (DS)

There can be two serverexecutions close to each other

26

0 4 8

DSCs = 2Ts = 4

0 4 8 1262 10

0 5 10

1

2

0 4 8 1262 10

0 5 10

ape

2

deadlinemiss

Deferrable Server (DS)

27

Analysis of RM + DS

112

2)(

1

lub

n

s

ss

DSRM

U

UnUnU

DS

1

Cs Cs

C1Ts +Cs 2Ts+Cs

2C2

T1

Cs

T2

2Cs = T1 – Ts

C1 = T2 – T1

C2 = T3 – T2

C1

C2

28

Us

0 1

1

ln2

)(lub nU DSRM

PS

DS

)1()( /1lub n

sPSRM KnUnU

1

2

sPS U

K12

2

s

sDS U

UK

RM + DS schedulability

29

12

2)1(

1

s

sn

ii U

UU

Analysis with Hyperbolic Bound

A set of periodic tasks is schedulable by Rate Monotonic in the presence of a Deferrable Server with utilization Us if

n

iiUP

1

)1(Defining

the maximum server utilization that guarantees theschedulability of the periodic task set is

12

2max

P

PU s

30

Response time under DS

Consider a DS running at the highest priority and anaperiodic job arriving when the server is idle:

ape

full service periods final chunk

Ca

(Cs, Ts)

asaaa TR

a = Ts ra

ra

Ts

1

s

saa C

CC sasaa CCC

initial delay

ra

Page 29: 12/11/2015 Periodic tasks Aperiodic tasks · 12/11/2015 1 Periodic tasks + Aperiodic tasks 2 Handling aperiodic tasks Aperiodic tasks are typically activated by the arrival of external

12/11/2015

5

25

However, DS does not behaves like a periodic task and it ismore invasive than PS.

Keeping the budget decreases the utilization bound.

ape

0 4 8 1262 10

0 4 8

DSCs = 1Ts = 4

Deferrable Server (DS)

There can be two serverexecutions close to each other

26

0 4 8

DSCs = 2Ts = 4

0 4 8 1262 10

0 5 10

1

2

0 4 8 1262 10

0 5 10

ape

2

deadlinemiss

Deferrable Server (DS)

27

Analysis of RM + DS

112

2)(

1

lub

n

s

ss

DSRM

U

UnUnU

DS

1

Cs Cs

C1Ts +Cs 2Ts+Cs

2C2

T1

Cs

T2

2Cs = T1 – Ts

C1 = T2 – T1

C2 = T3 – T2

C1

C2

28

Us

0 1

1

ln2

)(lub nU DSRM

PS

DS

)1()( /1lub n

sPSRM KnUnU

1

2

sPS U

K12

2

s

sDS U

UK

RM + DS schedulability

29

12

2)1(

1

s

sn

ii U

UU

Analysis with Hyperbolic Bound

A set of periodic tasks is schedulable by Rate Monotonic in the presence of a Deferrable Server with utilization Us if

n

iiUP

1

)1(Defining

the maximum server utilization that guarantees theschedulability of the periodic task set is

12

2max

P

PU s

30

Response time under DS

Consider a DS running at the highest priority and anaperiodic job arriving when the server is idle:

ape

full service periods final chunk

Ca

(Cs, Ts)

asaaa TR

a = Ts ra

ra

Ts

1

s

saa C

CC sasaa CCC

initial delay

ra

Page 30: 12/11/2015 Periodic tasks Aperiodic tasks · 12/11/2015 1 Periodic tasks + Aperiodic tasks 2 Handling aperiodic tasks Aperiodic tasks are typically activated by the arrival of external

12/11/2015

5

25

However, DS does not behaves like a periodic task and it ismore invasive than PS.

Keeping the budget decreases the utilization bound.

ape

0 4 8 1262 10

0 4 8

DSCs = 1Ts = 4

Deferrable Server (DS)

There can be two serverexecutions close to each other

26

0 4 8

DSCs = 2Ts = 4

0 4 8 1262 10

0 5 10

1

2

0 4 8 1262 10

0 5 10

ape

2

deadlinemiss

Deferrable Server (DS)

27

Analysis of RM + DS

112

2)(

1

lub

n

s

ss

DSRM

U

UnUnU

DS

1

Cs Cs

C1Ts +Cs 2Ts+Cs

2C2

T1

Cs

T2

2Cs = T1 – Ts

C1 = T2 – T1

C2 = T3 – T2

C1

C2

28

Us

0 1

1

ln2

)(lub nU DSRM

PS

DS

)1()( /1lub n

sPSRM KnUnU

1

2

sPS U

K12

2

s

sDS U

UK

RM + DS schedulability

29

12

2)1(

1

s

sn

ii U

UU

Analysis with Hyperbolic Bound

A set of periodic tasks is schedulable by Rate Monotonic in the presence of a Deferrable Server with utilization Us if

n

iiUP

1

)1(Defining

the maximum server utilization that guarantees theschedulability of the periodic task set is

12

2max

P

PU s

30

Response time under DS

Consider a DS running at the highest priority and anaperiodic job arriving when the server is idle:

ape

full service periods final chunk

Ca

(Cs, Ts)

asaaa TR

a = Ts ra

ra

Ts

1

s

saa C

CC sasaa CCC

initial delay

ra

Page 31: 12/11/2015 Periodic tasks Aperiodic tasks · 12/11/2015 1 Periodic tasks + Aperiodic tasks 2 Handling aperiodic tasks Aperiodic tasks are typically activated by the arrival of external

12/11/2015

6

31

Response time under DS

If a task arrives close to the next server period, a value ea < Cs

is executed.

ape

full service periods final chunk

Ca

(Cs, Ts)

asaaa TR

a = Ts ra

ra

Ts

1

s

aaa C

eC saaaa CeC

initial delay

ra

ea = min(a, Cs)In general:

32

Designing server parameters

1. Determine Us using

2. Define Us Us

3. Define Ts = min (T1, …, Tn)

4. Compute Cs = UsTs

max

max

server

n

ii KU

1

)1(

33

Sporadic Server (SS)

It preserves the budget like DS, but it is lessaggressive than DS, since the budget is replenishedonly Ts units after its consumption.

SS is not activated periodically, but from the analysispoint of view it behaves like a period task withcomputation time Cs and period Ts.

ape

0 4 8 1262 10

0 4 8

SSCs = 1Ts = 4

12

2

Ts Ts+1 +1

34

Sporadic Server rules

Rule 1At time tA, at which the following event occurs:

(qs > 0) AND ( pending aperiodic requests)

set the replenishment time in the future at time RT = tA + Ts

Letqs the current server budget

ds the current server deadline

Rule 2At time tI, at which the following event occurs:

(qs 0) OR ( pending aperiodic requests)

set the replenishment amount equal to the budget Cape(tA, tI)consumed in the interval [tA, tI].

36

Total Bandwidth Server (TBS)

It is a dynamic priority server, used along withEDF.

Each aperiodic request is assigned a deadline sothat the server demand does not exceed a givenbandwidth Us .

Aperiodic jobs are inserted in the ready queueand scheduled together with the HARD tasks.

Page 32: 12/11/2015 Periodic tasks Aperiodic tasks · 12/11/2015 1 Periodic tasks + Aperiodic tasks 2 Handling aperiodic tasks Aperiodic tasks are typically activated by the arrival of external

12/11/2015

6

31

Response time under DS

If a task arrives close to the next server period, a value ea < Cs

is executed.

ape

full service periods final chunk

Ca

(Cs, Ts)

asaaa TR

a = Ts ra

ra

Ts

1

s

aaa C

eC saaaa CeC

initial delay

ra

ea = min(a, Cs)In general:

32

Designing server parameters

1. Determine Us using

2. Define Us Us

3. Define Ts = min (T1, …, Tn)

4. Compute Cs = UsTs

max

max

server

n

ii KU

1

)1(

33

Sporadic Server (SS)

It preserves the budget like DS, but it is lessaggressive than DS, since the budget is replenishedonly Ts units after its consumption.

SS is not activated periodically, but from the analysispoint of view it behaves like a period task withcomputation time Cs and period Ts.

ape

0 4 8 1262 10

0 4 8

SSCs = 1Ts = 4

12

2

Ts Ts+1 +1

34

Sporadic Server rules

Rule 1At time tA, at which the following event occurs:

(qs > 0) AND ( pending aperiodic requests)

set the replenishment time in the future at time RT = tA + Ts

Letqs the current server budget

ds the current server deadline

Rule 2At time tI, at which the following event occurs:

(qs 0) OR ( pending aperiodic requests)

set the replenishment amount equal to the budget Cape(tA, tI)consumed in the interval [tA, tI].

36

Total Bandwidth Server (TBS)

It is a dynamic priority server, used along withEDF.

Each aperiodic request is assigned a deadline sothat the server demand does not exceed a givenbandwidth Us .

Aperiodic jobs are inserted in the ready queueand scheduled together with the HARD tasks.