Scheduling Aperiodic and Sporadic J obs Def init ions Comparison - - PDF document

scheduling aperiodic and sporadic j obs
SMART_READER_LITE
LIVE PREVIEW

Scheduling Aperiodic and Sporadic J obs Def init ions Comparison - - PDF document

CPSC-663: Real-Time Systems Aperiodic and Sporadic Jobs Scheduling Aperiodic and Sporadic J obs Def init ions Comparison t o t radit ional scheduling of asynchronous event s Polling Server Def ererable Server Sporadic


slide-1
SLIDE 1

CPSC-663: Real-Time Systems Aperiodic and Sporadic Jobs 1

Scheduling Aperiodic and Sporadic J obs

  • Def init ions
  • Comparison t o t radit ional scheduling of asynchronous

event s

  • Polling Server
  • Def ererable Server
  • Sporadic Server
  • Generalized Processor Sharing
  • Const ant Ut ilizat ion Server
  • Tot al Bandwidt h Server
  • Preempt ive Weight ed Fair Queueing

Scheduling Aperiodic and Sporadic J obs

  • When variat ions in int er-release t imes and execut ion t imes are

small: – can t reat t ask as periodic t ask T=(ps, es), and schedule it accordingly.

  • What about sporadic j obs? can arrive at any t ime

execut ion t imes vary widely deadlines are unkown a priori?

  • Given:

n periodic t asks T1, … , Ti = (pi, ei), … , Tn priorit y-driven scheduling algorit hm

  • We want t o det ermine when t o execut e aperiodic and sporadic

j obs, i.e., – sporadic j ob: accept ance t est scheduling of accept ed j ob – aperiodic j ob: schedule j ob t o complet e ASAP.

slide-2
SLIDE 2

CPSC-663: Real-Time Systems Aperiodic and Sporadic Jobs 2

Priorit y Queues f or Periodic/ Sporadic/ Aperiodic J obs

Processor Acceptance Test Sporadic Jobs Periodic Jobs Aperiodic Jobs reject

Scheduling Algorit hms, Overview

Non-Real-Time Systems Real-Time Systems Background Interrupt-Driven Polled Slack Stealing Bandwidth Preserving Scheduling Aperiodic (Sporadic) Jobs:

slide-3
SLIDE 3

CPSC-663: Real-Time Systems Aperiodic and Sporadic Jobs 3 Background/ I nt errupt -Driven vs. Slack St ealing

  • Background:

– Aperiodic j ob queue has always lowest priorit y among all queues. – Periodic t asks and accept ed j obs always meed deadlines. – Simple t o implement . – Execut ion of aperiodic j obs may be unduly delayed.

  • I nt errupt -Driven:

– Response t ime as short as possible. – P eriodic t asks may miss some deadlines.

  • Slack St ealing:

– P

  • st pone execut ion of periodic t asks only when it is saf e t o do

so:

  • Well-suit ed f or clock-driven environment s.
  • What about priorit y-driven environment s? (quit e

complicat ed)

Examples

A : r = 0.1 , e = 2.1 Background: Interrupt-Driven: Slack Stealing: T T

1 2

3 1 10 4 = = ( , ) ( , )

slide-4
SLIDE 4

CPSC-663: Real-Time Systems Aperiodic and Sporadic Jobs 4 Polled Execut ion vs. Bandwidt h Preserving Servers

  • Polling server (ps, es):

scheduled as periodic t ask. ps : Poller ready f or execut ion every ps t ime unit s. es : Upper bound on execut ion t ime.

  • Terminology:

– (Execut ion) budget : es – Replenishment : set budget t o es at beginning of period. – Poller consumes budget at rat e 1 while execut ing aperiodic j obs. – Poller exhaust s budget whenever poller f inds aperiodic queue empt y. – Whenever t he budget is exhaust ed, t he scheduler removes t he poller f rom periodic queue unt il replenished.

  • Bandwidt h-preserving server algorit hms:

– I mprove upon polling approach – Use periodic servers – Are def ined by consumpt ion and replenishment rules.

Example: Polling Server

Rate-Monotonic:

PS=(3, 1) T1=(φ=2, 3.5, 1.5) T2=(φ=0, 6.5, 0.5)

A : r = 2.8, e = 1.7

budget

slide-5
SLIDE 5

CPSC-663: Real-Time Systems Aperiodic and Sporadic Jobs 5

Def errable Servers

  • Rules:

– Consumpt ion: Execut ion budget consumed only when server execut es. – Replenishment : Execut ion budget of server is set t o es at each mult iple of ps.

  • Preserves budget when no aperiodic j ob is ready.
  • Any budget held prior t o replenishment is lost (no cumulat ion).

Example: Def errable Server wit h RM

Rate-Monotonic:

DS=(3, 1) T1=(φ=2, 3.5, 1.5) T2=(φ=0, 6.5, 0.5)

A : r = 2.8, e = 1.7

budget

slide-6
SLIDE 6

CPSC-663: Real-Time Systems Aperiodic and Sporadic Jobs 6

Example: Def errable Server wit h EDF

EDF:

DS=(3,1) T1=(φ=2,3.5,1.5) T2=(φ=0,6.5,0.5)

A : r = 2.8, e = 1.7

budget

Combinat ion of Def er able Server wit h Background Server

DS=(3,1) T1=(φ=2,3.5,1.5) T2=(φ=0,6.5,0.5)

A : r = 2.8, e = 1.7

budget

serve in background!

slide-7
SLIDE 7

CPSC-663: Real-Time Systems Aperiodic and Sporadic Jobs 7 Why not I ncrease t he Budget ?

DS=(3,1) T1=(3.5,1.5) T2=(6.5,0.5)

Schedulabilit y f or St at ic-Priorit y Syst ems

(DS has highest priorit y)

  • Lemma:

I n a st at ic-priorit y periodic syst em wit h Di < = pi, wit h a def erable server TDS(ps, es) wit h highest priorit y, a crit ical inst ant f or Ti happens when: (1) r i,c = t 0 f or some j ob J i,c in Ti. (2) j obs of higher-priorit y t asks are released at t ime t 0. (3) budget of (backlogged) server is es at t ime t 0. (4) next replenishment t ime is t 0+es.

  • I nt uit ively: Low-priorit y t asks suf f er f rom a “back-t o-back” hit

by t he def erable server.

slide-8
SLIDE 8

CPSC-663: Real-Time Systems Aperiodic and Sporadic Jobs 8

Time-Demand Analysis

  • Schedulable Ut ilizat ion:

– Generally, no known schedulable ut ilizat ion. – Only except ion:

  • ps <

p1 < p2 < … < pn < 2ps

  • pi = Di
  • r at e-monot onic scheduling
  • pn >

ps + es – For t his case, t he schedulable ut ilizat ion is

k i k k s s s s i i

e p t e p e t e e t w

− =

      +       − + + =

1 1

) (

          − + + − =

1 1 2 ) 1 ( ) (

1 1 / s n s DS RM

u u n n U

Def erable Ser ver s and Ar bit r ar y St at ic Pr ior it y

  • Problem:

Any budget t hat is not consumed at end of server period is lost .

  • Maximum amount of t ime DS can consume depends on

– Release t ime of all periodic j obs (wit h respect t o replenishment t imes) – Execut ion t imes of all t asks.

  • Upper bound on t ime demand f or lower-priorit y t asks t han DS:
  • Mult iple def erable servers:

– Time demand f or t ask wit h priorit y lower t han m DS’s:

k i k k q s m q q s q s s i i

e p t e p e t e e t w

∑ ∑

− = =

      +                 − + + + ≤

1 1 , 1 , ,

1 ) (

k i k k s s s s i i

e p t e p e t e e t w

− =

      +       − + + ≤

1 1

) (

slide-9
SLIDE 9

CPSC-663: Real-Time Systems Aperiodic and Sporadic Jobs 9

Using t he Schedulable Ut ilizat ion:

  • Assume t hat Ti has lower priorit y t han server.
  • TDS(ps, es) behaves like a periodic t ask (ps, es), except t hat it may

execut e f or at most es addit ional t ime unit s during t he int erval (r i,c, r i,c+Di).

  • Example:
  • T1:
  • T2:
  • T3:

not affected by TDS

scheduling algorithm no!

) 1 (

1

+ ≤ + + +

=

i U p b e u u

X i i s s i k k

) 4 . 1 , 7 ( ) 5 . , 5 ( ) 8 . , 4 ( ) 6 . , 3 (

3 2 1

T T T T

DS

) 4 ( 757 . 8143 .

3 3 1 RM s s k k

U p e u u = ≤ = + +

=

) 3 ( 7797 . 66 .

2 2 1 RM s s k k

U p e u u = ≤ = + +

=

Schedulabilit y f or Deadline-Driven Syst ems

  • Lemma:

A periodic t ask Ti in a syst em of n independent , preempt ive periodic t asks is schedulable wit h a DS wit h period ps, execut ion t ime es, and ut ilizat ion us, according t o t he EDF algorit hm if

1 1 ) , min(

1

≤         − + +

= n k i s s s k k k

D e p u p D e

slide-10
SLIDE 10

CPSC-663: Real-Time Systems Aperiodic and Sporadic Jobs 10

Proof

Proof:

  • Let t be the deadline of some Job Ji,c.
  • Let t-1 be the last point in time before t where either processor idle,
  • r was executing a lower-priority task (deadline after t).

...

es es es es t-1 t ps t-1+es If Jic misses deadline at time t, total amount of processor time consumed by Deferrable Server during interval (t-1, t] is bounded by :

Jic misses deadline here!

s s s s

e p e t t e       − − +

−1

Proof (I I )

P roof :

  • Time consumed by def errable server:
  • Time consumed by Task Tk:
  • We used “f loor” inst ead of “ceiling” because last invocat ion has

deadline af t er t .

  • We miss deadline if we don’t have enough t ime t o f inish by t ime t :
  • Divide by (t – t -1) and go f rom t here.

) ( ) (

1 1 1 1 s s s s s s s s s s s DS

e p t t u e p e t t e e p e t t e t t w − + − = − − + ≤       − − + = −

− − − − k k k k k

p t t e p t t e t t w / ) ( ) (

1 1 1 − − −

− ≤       − = −

= − − −

− + − + − < −

n k s s s k k

e p t t u t t p e t t

1 1 1 1

) ( ) (

slide-11
SLIDE 11

CPSC-663: Real-Time Systems Aperiodic and Sporadic Jobs 11

Sporadic Servers

  • Problem wit h Def erable Server: TDS(ps, es) may delay lower-

priorit y j obs longer t han periodic t ask T(ps, es).

  • Sporadic Server (SS):

Never use more t ime t han t he periodic t ask T(ps, es) wit h same paramet ers.

  • I f so, we can t reat TSS j ust as a periodic t ask.

Sporadic Servers in St at ic-Priorit y Syst ems

  • Not at ion:

– T : Task syst em wit h n t asks. – TSS : Sporadic server, arbit rary priorit y. – TH : Subset of T wit h higher priorit y t han TSS. – t r : Lat est replenishment t ime. – t f : First inst ant af t er t r at which server begins t o execut e. – t e : Ef f ect ive replenishment t ime.

  • The scheduler det ermines t e based on hist ory and set s next

replenishment t ime t o t e + ps.

slide-12
SLIDE 12

CPSC-663: Real-Time Systems Aperiodic and Sporadic Jobs 12

Simple Sporadic Server

  • Consumpt ion Rules: The ser ver ’s execut ion budget is consumed at t he r at e of one

at any t ime t af t er t r unt il t he budget is exhaust ed whenever t he f ollowing t wo condit ions are t rue. When t hese condit ions are not t rue, t he ser ver holds it s budget :

– C1: The server is execut ing. – C2: The server has execut ed since t r and is suspended at t he t ime t , and TH is idle.

  • Replenishment Rules:
  • R1:

The execut ion budget is set t o es and t he cur r ent t ime t r is recorded init ially when t he syst em begins execut ion and each t ime when t he budget is replenished.

  • R2:

The next budget replenishment t ime is det ermined at t ime t f when t he ser ver f ir st begins t o execut e since t r. At t ime t f , t e is set t o t he lat est t ime inst ant at which a lower -pr ior it y t ask execut es in (t r, t f ), and set t o t r if TH is busy t hr oughout t his int er val. The next r eplenishment t ime is set at t e + ps.

  • R3:

The next r eplenishment occur s at t he next r eplenishment t ime, except under t he f ollowing condit ions when t he r eplenishment may be done sooner

  • r lat er.

– (a) I f t he next replenishment t ime t e + ps is earlier t han t f , t he budget is replenished as soon as it is exhaust ed. – (b) The budget is replenished at t ime t whenever t he syst em T has been idle bef ore t and a periodic j ob is released at t .

Simple Sporadic Server: Example

A1(r=3, e=1) A2(r=7, e=2) A3(r=15.5, e=2)

Budget 1.5 1.0 0.5 T1 T2 TS T3

T1 = (3, 0.5) T2 = (4, 1.0) T3 = (19, 4.5) TS = (5, 1.5)

slide-13
SLIDE 13

CPSC-663: Real-Time Systems Aperiodic and Sporadic Jobs 13

A Sit uat ion where Rule 3a Applies

TH server TL ta ta+ps tf

I nf ormal Proof of Correct ness

  • “Correct ness”: The server never demands more t ime in any

int erval t han corresponding periodic t ask Ts = (ps, es).

  • For now: T has not been idle, and Rule R3(b) has never applied.
  • We show t hat server “emulat es” Task Ts=(ps,es).
  • For t his, we view replenishment t ime as nominal “release t ime” of

server j ob. Each server j ob only execut es at t imes when a j ob of Ts would.

  • “Correct ness”: The server never demands more t ime in any

int erval t han corresponding periodic t ask Ts = (ps, es).

  • For now: T has not been idle, and Rule R3(b) has never applied.
  • We show t hat server “emulat es” Task Ts=(ps,es).
  • For t his, we view replenishment t ime as nominal “release t ime” of

server j ob.

  • Rule C1: Each server j ob never

execut es f or more t han it s budget es..

  • Rule C

2: Budget of idle sporadic server decreases as if server was execut ing.

  • On t he ot her hand: C2 means t hat server holds on t o budget when

– J ob in TH is execut ing. (obviously correct ) – Server has not execut ed since t r. (Act ual release t ime can be lat er t han nominal release t ime.)

slide-14
SLIDE 14

CPSC-663: Real-Time Systems Aperiodic and Sporadic Jobs 14

I nf ormal Proof of Correct ness (cont .)

  • Rules R2 and R3(a) make sure t hat next replenishment t ime

always set ps t ime unit s lat er t han ef f ect ive release t ime t e. The next ef f ect ive release t ime is never earlier t han next replenishment t ime.

  • R2: Make ef f ect ive release t ime as early as possible.
  • R3(a): Emulat es sit uat ion where j ob in Ts t akes more t ime t o

complet e t han one period.

  • R3(b): Applicable only when busy int erval of periodic t ask syst em

ends, and a new one st art s. Behavior of t asks in old busy period does not af f ect new busy period. This condit ion is already account ed f or in schedulabilit y analysis

  • f T and Ts.

Emulat ing Generalized Processor Sharing

  • Generalized Processor Sharing (bit -by-bit Round Robin):
  • Timing isolat ion.
  • Emulat e GP

S by (f or example) – Const ant Ut ilizat ion Servers – Tot al Bandwidt h Servers – Weight ed Fair-Queueing

  • St ruct ure: Run server algorit hm on t op of EDF scheduler.
slide-15
SLIDE 15

CPSC-663: Real-Time Systems Aperiodic and Sporadic Jobs 15

Scheduling Sporadic J obs wit h EDF

  • Def inition: Densit y of sporadic j ob J i wit h release t ime r i,

maximum execut ion t ime ei and deadline di: densit yi = ei/ (di - r i).

  • Theorem: A syst em of independent , preempt able sporadic j obs is

schedulable according t o EDF if t he t ot al densit y of all act ive j obs in t he syst em is no great er t han 1 at all t imes.

Scheduling Sporadic J obs wit h EDF (cont )

  • Theorem is not necessary!
  • Example:

density 0.5 1.0 1.5

slide-16
SLIDE 16

CPSC-663: Real-Time Systems Aperiodic and Sporadic Jobs 16

Scheduling Sporadic J obs wit h EDF (cont )

  • Sporadic t ask Si as st ream of sporadic j obs Si1, Si2, Si3, ...
  • Execut ion t ime of Sij is eij.
  • “Period” pij is t ime bet ween invocat ion of Sij and Si(j +1).
  • I nst ant aneous ut ilizat ion of sporadic j ob Sij : eij/ pij.
  • I nst ant aneous ut ilizat ion of sporadic t ask Si: ui = max j(eij/ pij).
  • Corollary: A syst em of n independent , preempt able sporadic

t asks, which is such t hat t he relat ive deadline of every j ob is equal t o it s period, is schedulable on a processor according t o t he EDF algorit hm if t he t ot al inst ant aneous ut ilizat ion is equal or less t o 1.

Const ant Ut ilizat ion Server Algorit hm

  • A Const ant Ut ilizat ion Server emulat es a sporadic t ask wit h a

const ant inst ant aneous ut ilizat ion.

  • Consumpt ion rule:

– A server consumes it s budget only when it execut es.

  • Replenishment rules (assume: server is allocat ed ut ilizat ion us):

R1 I nit ially, set es := 0 and d := 0. R2 When an aperiodic j ob wit h execut ion t ime e arrives at t ime t t o an empt y aperiodic j ob queue, (a) if t < d, do not hing. (b) if t > = d, set es := e and d := t + es/ us. R3 At t he deadline d of t he server, (a) if t he server is backlogged, set es := e and d := d + e/ us (b) if t he server is idle, do not hing.

slide-17
SLIDE 17

CPSC-663: Real-Time Systems Aperiodic and Sporadic Jobs 17

Const ant Ut ilizat ion Server: Example

Budget

2.0 1.0

T1 T2

A1(r=3, e=1) A2(r=6.9, e=2) A3(r=15.5, e=2)

TCU (us=25%) T3

T1 = (3, 0.5) T2 = (4, 1.0) T3 = (19, 4.5)

What about Unknown Execut ion Times?

  • Assumpt ion f or const ant ut ilizat ion server: execut ion t imes of

aperiodic j obs are known upon arrival. ⇒ Rest rict ive.

  • P
  • ssible solut ion: Assign f ixed bandwidt h t o server:

– f ixed budget es – f ixed period es/ us

  • Upon j ob complet ion of j ob wit h execut ion t ime e <

es, reduce current deadline of server by (es-e)/ us bef ore replenishing again.

  • For execut ion t ime e >

es, use more t han one server period.

slide-18
SLIDE 18

CPSC-663: Real-Time Systems Aperiodic and Sporadic Jobs 18

Problems wit h Const ant Ut ilizat ion Server: Unused Capacit y

Budget

2.0 1.0

T1 T2 A1(r =3, e=1) A2(r =6.9, e=2) A3(r=14, e=2) TS T3

T1 = (3, 0.5) T2 = (4, 1.0) T3 = (19, 4.5)

d=15

!

Tot al Bandwidt h Server

  • Allow server t o use background t ime.
  • Consumpt ion rule:

– A server consumes it s budget only when it execut es.

  • Replenishment rules:

R1 I nit ially, set es := 0 and d := 0. R2 When an aperiodic j ob wit h execut ion t ime e arrives at t ime t t o an empt y aperiodic j ob queue, set d := max(d,t ) + e/ us, and es := e. R3 Upon complet ion of t he current aperiodic j ob, remove j ob f rom queue. (a) if t he server is backlogged, set d := d + e/ us and es := e (b) if t he server is idle, do not hing.

slide-19
SLIDE 19

CPSC-663: Real-Time Systems Aperiodic and Sporadic Jobs 19 Unused Capacit y Eliminat ed wit h Tot al Bandwidt h Ser ver

Budget 2.0 1.0 T1 T2

A1(r=3, e=1) A2(r=6.9, e=2) A3(r=14, e=2)

TS T3

T1 = (3, 0.5) T2 = (4, 1.0) T3 = (19, 4.5)

d=14.9

Correct ness of Tot al Bandwidt h Server

  • Const ant Ut ilizat ion Server is correct .
  • How does Tot al Bandwidt h Server af f ect periodic t asks

dif f erent ly?

  • Only int erest ing case:

– Budget of Tot al Bandwidt h Server replenisched at t ime t bef ore it s deadline. – New deadline is d’ = d + e/ us.

  • How does t his af f ect t he execut ion of periodic t asks?

– Case 1: Current periodic j ob J i,c has deadline bef ore d’ ⇒ execut ion of periodic j ob is not af f ect ed. – Case 2: Current periodic j ob J i,c has deadline af t er d’

  • Case 2.1: Current periodic j ob J i,c is ready bef ore t ime t ⇒

execut ion t ime demanded by Tot al Bandwidt h Server f rom r i,k t o d’ is same as f or Const ant Ut ilizat ion Server.

  • Case 2.2: Current periodic j ob J i,c is ready af t er t ime t ⇒

execut ion t ime demanded by Tot al Bandwidt h Server f rom r i,k t o d’ is less t han t hat of Const ant Ut ilizat ion Server.

slide-20
SLIDE 20

CPSC-663: Real-Time Systems Aperiodic and Sporadic Jobs 20

Nonpreempt able Port ions

  • Nonpreempt able port ions eit her reduce schedulable ut ilizat ion or

int roduce t ardiness.

  • Def initions:

– bmax(np) is maximum execut ion t ime of nonpreempt able port ions of periodic t asks and j obs execut ed by servers. – ef f ect ive execut ion t ime of j ob execut ed by server: rat io of j ob execut ion t ime and server size. – Dmin is minimum of all relat ive deadlines of periodic t asks and ef f ect ive execut ion t imes of j obs execut ed by all servers in t he syst em.

  • Corollary: When a syst em of periodic t asks is scheduled wit h one
  • r more t ot al bandwidt h and const ant ut ilizat ion server on t he

EDF basis, every periodic t ask and every server meet s it s deadline if t he sum of t he t ot al densit y of t he periodic t asks and t he t ot al size of all servers is no great er t han 1-bmax(np)/ Dmin.

Fairness and St arvat ion

  • Tot al Bandwidt h Server is not f air
  • Example: TB1 and TB2 each of size 0.5

– I f bot h servers never idle, service is approximat ely equally shared among servers. – Wit h idling servers, t his is not always t he case. – P rocessor t ime is allocat ed f airly during (0,2t ), but not during (t , 2t ) t 2t

TB1 backlogged TB2 idle deadline for TB1 is >= 2t lots of short jobs arrive for TB2

slide-21
SLIDE 21

CPSC-663: Real-Time Systems Aperiodic and Sporadic Jobs 21

Fairness & St arvat ion

Def init ion (Fairness): wi(t 1,t 2) = t ot al at t ained processor t ime f or Server i during t ime int erval (t 1, t 2). wi(t 1,t 2)/ ui = normalized service. Scheduler is f air during int erval (t 1,t 2) if normalized service at t ained by all servers does not dif f er by more t han a f airness t hreshold FR.

  • I deally, FR is zero:

) ( ) , ( ) , ( ) , (

1 2 2 1 2 1 2 1

t t u t t w u u t t w t t w

i i j i j i

− = ⇔ =

Eliminat ing St arvat ion

  • P

roblem wit h Tot al Bandwidt h server: When processing t ime available, allows t o indef init ely put deadlines int o t he f ut ure.

  • Const ant Ut ilizat ion server keeps deadlines “close”:

d - t < = ei,max / ui, where ei,max is max. execut ion t ime of j obs served by Server i.

  • Replenishment rules f or st arvat ion-f ree Const ant Ut ilizat ion /

Background server: – R1 - R3 : Same as Const ant Ut ilizat ion server. – R4 : Whenever busy int erval ends, replenish budget of all backlogged servers.

  • Not e: Background t ime is not dist ribut ed t o backlogged servers

according t o t heir size => st arvat ion is eliminat ed, but not unf airness.

slide-22
SLIDE 22

CPSC-663: Real-Time Systems Aperiodic and Sporadic Jobs 22

Processor Sharing

  • Process a single at omic unit at a t ime per backlogged queue in

round-robin f ashion.

  • I f t here are N backlogged servers, t hen each server receives

exact ly 1/ N of t he available capacit y.

  • Some t erms:

– R(t ) = number of rounds in t he P S service discipline t hat have

  • ccurred up t o t ime t

– N(t ) = number of nonempt y queues at t ime t – P

ij

= j ob lengt h of J ob i in Server j – r ij = arrival t ime of J ob i in Server j – Sij = value of R(t ) when J ob i in Server j arrives – Fij = value of R(t ) when J ob i in Server j t erminat es

  • Think of R(t ) as virt ual t ime, which records t he rat e of service

seen by j ob at head of queue in Server. R’(t ) = 1 / max[1,N(t )]

Preempt ive Weight ed Fair-Queueing Algorit hm

  • Replenishment rules similar t o Tot al Bandwidt h server; except f or

comput at ion of deadline at each replenishment t ime.

  • pWFQ algorit hm bounds f airness.
  • Replenishment rules of pWFQ server make it emulat e GPS server wit h

same size.

1 1 3 3 18

  • Virtual Time: Enqueue j obs in order of Finish Number: number of rounds

f or GP S server t o exhaust budget s.

u1=1/4 u2=1/8 u3=1/4 u4=3/8 5 10 15 21.2 25.2

slide-23
SLIDE 23

CPSC-663: Real-Time Systems Aperiodic and Sporadic Jobs 23

Rules f or pWFQ

  • Scheduling Rule: Assign priorit ies in order of increasing f inish number.
  • Consumpt ion Rule: pWFQ server consumes budget only when it execut es.
  • I nit ializat ion Rules:

I 1: When syst em is idle, FN = 0, Ub = 0, t -1 = 0. Budget s of all servers are zero. I 2: When f irst j ob arrives at t ime t wit h execut ion t ime e at some server FQk when syst em is idle: (a) t -1 := t , and Ub := Ub + uk, and (b) set budget ek of FQk t o e and f inish number f nk := e/ uk.

  • Rules f or updat ing Finish Times during Syst em Busy I nt erval:

R1: When j ob arrives at queue FQk while FQk is idle

(a) incr ement syst em f inish number FN := FN + (t -t -1)/ Ub (b) t -1 := t , and Ub := Ub + uk, and (c) set budget ek of FQk t o e and it s f inish number f nk := FN + e/ uk, enqueue server

R2: Whenever FQk complet es j ob

(a) if ser ver r emains backlogged, set ser ver budget ek t o e and incr ement it s f inish number: f nk := f nk + e/ uk. (b) if server becomes idle, updat e Ub and FN as f ollows: FN := FN + (t -t -1)/ Ub, t -1 := t , and Ub := Ub - uk. density of new job

Scheduling Sporadic Tasks in EDF Syst ems

  • Tot al densit y of periodic t asks is ∆ .
  • As long as t ot al densit y of sporadic j obs does not exceed 1-∆ , all

deadlines can be maint ained by EDF.

  • Accept ance Test :

– Maint ain list of t ime int ervals and t heir densit ies: – Accept ance t est t hen adds new densit y: t t