A Virtual Deadline Scheduler for Window-Constrained Service - - PowerPoint PPT Presentation

a virtual deadline scheduler for window constrained
SMART_READER_LITE
LIVE PREVIEW

A Virtual Deadline Scheduler for Window-Constrained Service - - PowerPoint PPT Presentation

Computer Science A Virtual Deadline Scheduler for Window-Constrained Service Guarantees Yuting Zhang, Richard West, Xin Qi Boston University RTSS 2004 RTSS 2004 Motivating Applications Computer Science Multimedia & weakly-hard


slide-1
SLIDE 1

Computer Science

RTSS 2004 RTSS 2004

A Virtual Deadline Scheduler for Window-Constrained Service Guarantees

Yuting Zhang, Richard West, Xin Qi Boston University

slide-2
SLIDE 2

Computer Science

RTSS 2004 RTSS 2004

Motivating Applications

Multimedia & weakly-hard real-time systems:

Not every deadline needs to be met Impossible to meet every deadline in overload case Can tolerate some deadlines being late or missed without degrading service too much Loss- or window-constraints on service

slide-3
SLIDE 3

Computer Science

RTSS 2004 RTSS 2004

Guarantee a fraction of service over a fixed window

  • f job instances

(m,k) window-constraint: At least m out of every k job instances meet their deadlines Example:

  • Window-Constrained Scheduling
slide-4
SLIDE 4

Computer Science

RTSS 2004 RTSS 2004

Window-Constrained Service

Provides independent service guarantees Each job gets a minimum fixed share of service without being affected by others Is suitable for overload cases Strategically skip some deadlines Min utilization may still be 100% for feasible schedule Has bounded delay and jitter Within a given window

slide-5
SLIDE 5

Computer Science

RTSS 2004 RTSS 2004

DWCS

Dynamic Window-Constrained Scheduling Consider periodic jobs with deadlines at the ends of their request periods Separately considers deadlines and window-constraints to order jobs Can guarantee the service with unit process time, constant request period up to 100% utilization May fail to provide service guarantees with different periods, even when the utilization is fairly low Problem: How to improve service guarantees when periods (or deadlines) are different?

slide-6
SLIDE 6

Computer Science

RTSS 2004 RTSS 2004

Talk Outline

Motivation

The relaxed model VDS algorithm Simulations Experiments Conclusions

slide-7
SLIDE 7

Computer Science

RTSS 2004 RTSS 2004

Feasibility Condition

Utilization: U = (Ci/Ti) Minimum Utilization: Umin = (miCi/kiTi) Feasible iff Umin ≤ 1 and service time, Ci = ∆ NP-hard problem for arbitrary Ci and Ti [Mok &Wang] Example: no feasible schedule even if Umin ≤ 1

J1 violates J3 J3 J2 J3 J3 J2 J1 J1 J2 J3 violates J1 J1 J2 J3 J3 J2 J1 J1 J2 Job (C,T,m,k) time 9 1 2 3 4 5 6 7 8 J1 (2,3,2,3) J2 (1,3,1,3) J3 (2,3,2,3) Umin 1 T1 T2 T3

slide-8
SLIDE 8

Computer Science

RTSS 2004 RTSS 2004

At least mi job instances are served in every window of ki requests allowing multiple requests that have arrived in the current window to be serviced in the same period The proportional share of resources allocated to a job in a window of size kiTi is still miCi/kiTi, but… Job instances can be buffered & scheduled after their deadlines with the relaxed model

The Relaxed Model

slide-9
SLIDE 9

Computer Science

RTSS 2004 RTSS 2004

Original versus Relaxed Model

Ci (a) kiTi kiTi Ti,1 Ti,1 kiTi kiTi (b) Ti,5 (c) Ti,4 Ti,1 kiTi kiTi

Job Ji: Ci=1, Ti=4, mi=2, ki=3

slide-10
SLIDE 10

Computer Science

RTSS 2004 RTSS 2004

VDS Algorithm

Virtual Deadline Scheduling (VDS) algorithm Works with both relaxed and original window-constrained scheduling models Job with lowest virtual deadline has highest priority Question: How do we calculate virtual deadlines?

slide-11
SLIDE 11

Computer Science

RTSS 2004 RTSS 2004

Virtual Deadline

Function of request period and window constraint If current constraint is (m’,k’), it makes sense to service the next job instance in (k’*T)/m’ time This is for proportional fairness Virtual deadline: Vd Vdi

i(t

(t) = ) = k ki

i’

’T Ti

i/m

/mi

i’

’ + + ts tsi

i(t

(t) ) tsi(t) : start of current request period at time unit t

T kT kT T C=1, T=4, m=2, k=3 = served C m’=2, k’=3, ts=12 t=0 t=12 Vd=3*4/2+12=18 t=14

slide-12
SLIDE 12

Computer Science

RTSS 2004 RTSS 2004

Service Constraint Updates

After serving job Ji with the lowest virtual deadline: Ci’ = Ci’-∆; if (Ci’ == 0) mi’--; For every job Jj: if ((Vdj <= ∆+t) && (j!=I) && (Ci’ >0)) Tag Jj with a violation if (a new job instance arrives) { kj’--; Cj’ = Cj ; if (kj’ == 0) { mj’ = mj; kj’ = kj;} } if (mj’ > 0) update Vdj //only for relaxed model if (((kj-kj’) >= (mj-mj’)) && (Ci’ == 0)) Cj’ = Cj ;

slide-13
SLIDE 13

Computer Science

RTSS 2004 RTSS 2004

Scheduling Eligibility

Schedule eligible job with the lowest virtual deadline Eligibility in every request period (C’ >0) Eligibility in every request window (m’>0) t J1 J2 (C,T,m,k)= (1,2,1,2) (C,T,m,k)= (1,1,1,3) t J1 c

T kT

slide-14
SLIDE 14

Computer Science

RTSS 2004 RTSS 2004

VDS vs. EDF, DWCS

Vd Vdi

i(t

(t) = ) = k ki

i’

’T Ti

i/m

/mi

i’

’ + + ts tsi

i(t

(t) )

If every ki is a multiple of mi, VDS reduces to EDF Where Ci = process time, kiTi/mi = request period If all Tis are constant, VDS reduces to DWCS Vd ∝ k’/m’ In these cases, VDS can guarantee 100% utilization for the same situations as EDF and DWCS When Ti, mi, ki are arbitrary, VDS more accurately captures information about a job’s combined urgency and importance

slide-15
SLIDE 15

Computer Science

RTSS 2004 RTSS 2004

Example

J2 J3 J1 J2 J3 J1 DWCS J1 J1 J2 EDF J2 J3 J1 J2 J3 J1 J3 violates J1 J1 J2 time 0 1 2 3 4 5 6 7 8 9 J1 (1,1,2,9) J2 (1,3,1,1) J3 (1,3,1,1) Job (C,T,m,k) Umin 8/9 J3 violates J2 J3 J1 J2 J3 J1 VDS J2 J3 J1 Vd1 9/2 5 11/2 9 9 9 X X 9 27/2 … Vd2 3 X X 6 X X 9 X X 12 … Vd3 3 3 X 6 6 X 9 9 X 12 …

slide-16
SLIDE 16

Computer Science

RTSS 2004 RTSS 2004

EWDF

Eligibility-based Window Deadline First Target for the relaxed model A variant of EDF with (service time=miCi, period=kiTi) Common window deadline for all job instances in the same window Eligibility test is the same as VDS

(1,3,1,1)

J2 J3 J1 J2 J3 J1 J2 J3 J1 EWDF time 9 1 2 3 4 5 6 7 8

J1 (1,1,2,9) J2 (1,3,1,1) J3 Job (C,T,m,k) Umin 8/9 Wd1 9 9 9 9 9 9 X X 9 18 … Wd2 3 X X 6 X X 9 X X 12 … Wd3 3 3 X 6 6 X 9 9 X 12 …

slide-17
SLIDE 17

Computer Science

RTSS 2004 RTSS 2004

VDS vs. EWDF

J1 (1,7,3,4) J2 (1,1,24,27) EWDF VDS J2 J2 J2 J2 J2 J2 J2 J2 J2 J2 J2 J2 J2 J2 J2 J2 J2 J2 J2 J2 J2 J1 J1 J1 J2 J2 J2 J2 J2 J2 J2 J2 J2 J2 J2 J2 J2 J1 J2 J2 J2 J2 J2 J2 J2 J2 J2 J2 J2 J2 J1 J2 J2 J1 delay = 24 Job (C,T,m,k) 0 1 2 3 4 5 6 7 8 9 101112131415 16171819202122232425262728time J2 J2 delay = 13 Umin 0.996

EWDF

Feasible for the relaxed model if Umin ≤ 1 Worst case delay: (kiTi-miCi) More deadlines missed Complexity: O(n) in worst case

slide-18
SLIDE 18

Computer Science

RTSS 2004 RTSS 2004

Service Share and Delay Bound

If a feasible VDS schedule exists: The minimum service share for each job i is miCi/kiTi The maximum delay for each job i is (ki – mi +1 )Ti – Ci J : C=1, T=3, m=2, k=3 c

T

  • !"# "

(k–m+1)T – C

$ EWDF: kiTi-miCi

slide-19
SLIDE 19

Computer Science

RTSS 2004 RTSS 2004

Feasibility Test

VDS guarantees 100% utilization for a job set with all Ci=∆, and Ti =qi∆ in the relaxed model Proof by reduction to a derived EDF scheduling problem Derived EDF: (Ci, kiTi/mi) with only mi instances VDS equivalent: (Ci, Vdi) with only mi instances U(VDS) = U(derived EDF) The relaxed model assures no idle time before overflow Note: VDS allows preemption at the granularity of ∆

slide-20
SLIDE 20

Computer Science

RTSS 2004 RTSS 2004

Simulations

Work load: Randomly generate 1,300,000 job sets Variable number of jobs (n) per job set, unit process time C, variable T, m and k for every job Performance metrics: Vtests: # of job sets that violate service requirement Vtestd: # of job sets that violate deadline requirement Vs: the total service violation rate of all jobs Vd: the total deadline violation rate of all jobs

slide-21
SLIDE 21

Computer Science

RTSS 2004 RTSS 2004

Results for the Original Model

Vtestd = Vtests Vd =Vs Violation in underload cases: DWCS: Umin> 0.6 EDF-Pfair: Umin> 0.9 VDS: Umin > 0.9 VDS has more violations in overload case Tries to maintain proportional fairness

Vtestd Vd DWCS 14555 340.46707 EDF-Pfair 77 4.679056 VDS 14 0.6

0.9<Umin ≤1.0

slide-22
SLIDE 22

Computer Science

RTSS 2004 RTSS 2004

Results for the Relaxed Model

50000 100000 150000 200000 250000 300000 350000 400000 (0.0- 0.1] (0.1- 0.2] (0.2- 0.3] (0.3- 0.4] (0.4- 0.5] (0.5- 0.6] (0.6- 0.7] (0.7- 0.8] (0.8- 0.9] (0.9- 1.0] (1.0- 1.1] (1.1- 1.2] (1.2- 1.3]

Umin Vs

VDS EWDF

slide-23
SLIDE 23

Computer Science

RTSS 2004 RTSS 2004

Results for the Relaxed Model

50000 100000 150000 200000 250000 300000 350000 400000 450000 (0.0- 0.1] (0.1- 0.2] (0.2- 0.3] (0.3- 0.4] (0.4- 0.5] (0.5- 0.6] (0.6- 0.7] (0.7- 0.8] (0.8- 0.9] (0.9- 1.0] (1.0- 1.1] (1.1- 1.2] (1.2- 1.3]

Umin

Vd VDS EWDF

slide-24
SLIDE 24

Computer Science

RTSS 2004 RTSS 2004

CPU Scheduling – Linux Kernel

0.069 0.167 0.276 0.331 0.374 0.464 0.522 0.592 0.673 0.725 0.796 0.838 0.917 0.986 1.061 1.113 1.192 1.222 1.323 1.369 1.419 1.505 1.55 1.654 1.697 1.745 1.804 1.869 1.938 20 40 60 80 100 120 140 160

Avg Violations per Process Umin

VDS DWCS

slide-25
SLIDE 25

Computer Science

RTSS 2004 RTSS 2004

Conclusions

We propose a relaxed (m,k) window-constrained model Appropriate for many classes of applications e.g., multimedia streaming & real-time data sampling We present a new algorithm: VDS Can make full use of resources while guaranteeing window-constraints Benefits of VDS shown via simulations and real implementation in the Linux kernel