A Delay Composition theorem for Real-Time Pipelines P. Jayachandran T. Abdelzaher Presenter: Sina...

26
A Delay Composition theorem for Real-Time Pipelines P. Jayachandran T. Abdelzaher Presenter: Sina Meraji

Transcript of A Delay Composition theorem for Real-Time Pipelines P. Jayachandran T. Abdelzaher Presenter: Sina...

Page 1: A Delay Composition theorem for Real-Time Pipelines P. Jayachandran T. Abdelzaher Presenter: Sina Meraji.

A Delay Composition theorem for Real-Time Pipelines

P. Jayachandran T. Abdelzaher

Presenter:Sina Meraji

Page 2: A Delay Composition theorem for Real-Time Pipelines P. Jayachandran T. Abdelzaher Presenter: Sina Meraji.

Outline

Problem and our goal

Delay Composition theorem

Pipeline Reduction

Page 3: A Delay Composition theorem for Real-Time Pipelines P. Jayachandran T. Abdelzaher Presenter: Sina Meraji.

Problem

We have: A set of tasks and a multistage

pipeline

Goal: Decide the schedulability of tasks in

the pipeline

Page 4: A Delay Composition theorem for Real-Time Pipelines P. Jayachandran T. Abdelzaher Presenter: Sina Meraji.

Goal

bound the end-to-end delay of a job in a multistage pipeline as a function of the execution times of higher-priority jobs in the pipeline

Page 5: A Delay Composition theorem for Real-Time Pipelines P. Jayachandran T. Abdelzaher Presenter: Sina Meraji.

Delay Composition

A job-additive component that is proportional to the sum of invocation execution times on a single stage

A stage-additive component that is proportional to the number of stages

Page 6: A Delay Composition theorem for Real-Time Pipelines P. Jayachandran T. Abdelzaher Presenter: Sina Meraji.

Delay Composition

No assumptions on the scheduling policy

No assumption on periodicity of the task set

No assumption on whether different invocations of the same task have the same priority.

Page 7: A Delay Composition theorem for Real-Time Pipelines P. Jayachandran T. Abdelzaher Presenter: Sina Meraji.

Delay Composition

Multi stage pipeline system

Equivalent single-stage system

Page 8: A Delay Composition theorem for Real-Time Pipelines P. Jayachandran T. Abdelzaher Presenter: Sina Meraji.

Assumptions

Tasks arrive to the system and require execution on a set of resources

Consider individual task invocations in isolation (job)

All the jobs require processing on all the stages and in the same order

Page 9: A Delay Composition theorem for Real-Time Pipelines P. Jayachandran T. Abdelzaher Presenter: Sina Meraji.

Assumptions N: number of stages

Ai,j: the arrival time of job Ji at stage j

Ai: arrival time of the job to the entire system

Di: end to end deadline of Ji

Page 10: A Delay Composition theorem for Real-Time Pipelines P. Jayachandran T. Abdelzaher Presenter: Sina Meraji.

Assumptions

Ci,j: Stage Execution Time

Si,j: Stage Start Time

Fi,j: Stage Finish Time

J1: job whose delay is to be estimated

Page 11: A Delay Composition theorem for Real-Time Pipelines P. Jayachandran T. Abdelzaher Presenter: Sina Meraji.

Assumptions

S: denote the set of all higher-priority jobs that have execution intervals in the pipeline between J1’s arrival and finish time (s include j1)

Ci,max1: largest stage execution time

Ci,max2: second largest stage execution times

Page 12: A Delay Composition theorem for Real-Time Pipelines P. Jayachandran T. Abdelzaher Presenter: Sina Meraji.

Pipeline Delay Composition Theorem

the end-to-end delay of a job J1 in an N-stage pipeline

Page 13: A Delay Composition theorem for Real-Time Pipelines P. Jayachandran T. Abdelzaher Presenter: Sina Meraji.

Example

Page 14: A Delay Composition theorem for Real-Time Pipelines P. Jayachandran T. Abdelzaher Presenter: Sina Meraji.

Example

Six stage pipeline using EDF

Computation time of each task on each stage is 1

T1=9, T2=6

Page 15: A Delay Composition theorem for Real-Time Pipelines P. Jayachandran T. Abdelzaher Presenter: Sina Meraji.

Solution

partition the end-to-end deadline of each task into per-stage deadlines

Per-stage deadline T1=1.5 T2=1

T2 has 0 slack it runs first T1 needs 2 time units per

stage

Page 16: A Delay Composition theorem for Real-Time Pipelines P. Jayachandran T. Abdelzaher Presenter: Sina Meraji.

Apply Theorem

T1 can be preempted by at most 2 invocations of T2

S contain 2 invocations of T2 with the invocation of T1

Page 17: A Delay Composition theorem for Real-Time Pipelines P. Jayachandran T. Abdelzaher Presenter: Sina Meraji.

Apply Theorem

A2>A1: Ceq2=2

A2<A1: Ceq2=1

A1: Ceq1=1

4

Page 18: A Delay Composition theorem for Real-Time Pipelines P. Jayachandran T. Abdelzaher Presenter: Sina Meraji.

Apply Theorem

Second summation is equal to 5 because of 5 stages

Total delay: 4+5=9

Lower than 12 schedulable

Page 19: A Delay Composition theorem for Real-Time Pipelines P. Jayachandran T. Abdelzaher Presenter: Sina Meraji.

Pipeline Reduction

Reduce the pipeline scheduling problem to an equivalent single stage

Swc: worst-case set of higher priority jobs that delay or preempt job J1

Sbef: jobs with Ai<=A1

Safter: jobs with Ai>A1

Page 20: A Delay Composition theorem for Real-Time Pipelines P. Jayachandran T. Abdelzaher Presenter: Sina Meraji.

Pipeline Reduction

Page 21: A Delay Composition theorem for Real-Time Pipelines P. Jayachandran T. Abdelzaher Presenter: Sina Meraji.

Pipeline Reduction replacing each pipeline job Ji in Sbef by an equivalent

single stage job (with the same priority and deadline) of execution time equal to Ci,max1

replacing each pipeline job Ji in Safter by an equivalent single stage job of execution time equal to Ci,max1 + Ci,max2

adding a lowest-priority job, J∗ e of execution time equal to

1

1, )(

N

jjii CMax

Page 22: A Delay Composition theorem for Real-Time Pipelines P. Jayachandran T. Abdelzaher Presenter: Sina Meraji.

Example

Rate Monotonic Scheduling

There can be at most one invocation

of each higher-priority task Ti in set Sbef

Page 23: A Delay Composition theorem for Real-Time Pipelines P. Jayachandran T. Abdelzaher Presenter: Sina Meraji.

Example

Page 24: A Delay Composition theorem for Real-Time Pipelines P. Jayachandran T. Abdelzaher Presenter: Sina Meraji.

Example

Task (of lowest priority), with a computation time equal to:

Task , each has the same period and deadline as one Ti in original set and execution time

i

N

Jjiiie CCC

1

1,1max,

* )(max

*eT

*iT

2max,1max,*

iii CCC

Page 25: A Delay Composition theorem for Real-Time Pipelines P. Jayachandran T. Abdelzaher Presenter: Sina Meraji.

Example According to Liu & layland bound:

Page 26: A Delay Composition theorem for Real-Time Pipelines P. Jayachandran T. Abdelzaher Presenter: Sina Meraji.

Thanks