Reder J. Brl, r..brl@tue.l TU/e Iformatca, System Archtecture ad Networg Reder J. Brl, r..brl@tue.l TU/e Iformatca, System Archtecture ad Networg Overvew Worst-case respose tme aalyss of real-tme tass uder FS Reder J. Brl Techsche Uverstet Edhove (TU/e) Mathematcs ad Computer Scece System Archtecture ad Networg Motvato Schedulg model Refuted aalyss pessmstc: W ECRTS 004 optmstc: W ECRTS 006 Revsed aalyss TU/e, CS-report 07-, 007 ECRTS 007 Remars Cocluso Mälardale Uversty, Swede, Aprl 008 Mälardale Uversty, Swede, Aprl 008 Reder J. Brl, r..brl@tue.l TU/e Iformatca, System Archtecture ad Networg Reder J. Brl, r..brl@tue.l TU/e Iformatca, System Archtecture ad Networg Motvato for FS Schedulg model for FS Fxed-rorty re-emptve Schedulg (FS): rawbacs of arbtrary pre-empto: cost, e.g. cache flushes ad re-loads; o-trval resource access protocols; Fxed-rorty No-pre-emptve Schedulg (FNS): Resolves drawbacs of arbtrary pre-empto, but at the cost of reduced schedulablty. Fxed-rorty Schedulg wth eferred pre-empto (FS): Betwee the extremes of FS ad FNS, although FNS s a specal case of FS. Based o model for FS Sgle processor; Set Γ of depedet perodc tass τ, τ,, τ ; Uque prortes, tass orderg: decreasg prortes; Cotuous schedulg; Characterstcs of tas τ : (release) perod T ; computato tme C ; (relatve) deadle ( T ); phasg ϕ. Basc assumptos: smlar to [Lu ad Laylad 7], but Mälardale Uversty, Swede, Aprl 008 Mälardale Uversty, Swede, Aprl 008 4 Reder J. Brl, r..brl@tue.l TU/e Iformatca, System Archtecture ad Networg Reder J. Brl, r..brl@tue.l TU/e Iformatca, System Archtecture ad Networg Schedulg model for FS Schedulg model for FS Refemet for FS: A tas τ s a AG of m() o-pre-emptable subobs subob has computato tme C, C, C, C,6 C,7 Cosequeces for aalyss of FS: blocg: all tass, except for the lowest prorty tas; C, C,5 B = max max C, > m( ) Specalzato: a tas τ s a sequece of m() subobs we ow get m( ) C = C, C,4 C,8 C,9 = Whe m() = for all, we get FNS. Mälardale Uversty, Swede, Aprl 008 5 potetal early completo of fal sub-ob C,m() : all tass, except for the hghest prorty tas Remar: C,m() wll be deoted as F Mälardale Uversty, Swede, Aprl 008 6
Reder J. Brl, r..brl@tue.l TU/e Iformatca, System Archtecture ad Networg Reder J. Brl, r..brl@tue.l TU/e Iformatca, System Archtecture ad Networg Refuted aalyss for FS Refuted aalyss for FS Based o aalyss for FS (recap) exted model wth resource sharg blocg B of τ ; crtcal stat of τ : smultaeous release wth all hgher prorty tass; max. blocg B by lower prorty tass. worst-case respose tme of tas s the smallest x R + satsfyg x = B + C + x C T < Mälardale Uversty, Swede, Aprl 008 7 Ital pessmstc aalyss for FS corporated cosequece of blocg oly, smlar to FS wth resource sharg,.e. crtcal stat of τ : smultaeous release wth all hgher prorty tass; max. blocg B by lower prorty tass. worst-case respose tme of tas s the smallest x R + satsfyg x x B C C < T = + + hece, = (B + C ) Mälardale Uversty, Swede, Aprl 008 8 Reder J. Brl, r..brl@tue.l TU/e Iformatca, System Archtecture ad Networg Reder J. Brl, r..brl@tue.l TU/e Iformatca, System Archtecture ad Networg Refuted aalyss for FS Refuted aalyss for FS Ital pessmstc aalyss for FS example tas T = C B (B + C ) = 4.6 whereas R,0 =.6 τ.4 τ 4.4 +. 0 tas τ tas τ Mälardale Uversty, Swede, Aprl 008.6.6 tme 9 Ehaced aalyss for FS (99) also corporated early completo of fal sub-ob, fal sub-ob has started whe τ executed C (F ) where s a arbtrary small postve umber; ( ) = (B + C (F )) + (F ) we ow fd:.6 ( ) tas τ = (.4 + ) + (. ) =.4 + + (. ).6 =.6 tas τ for 0.6 Mälardale Uversty, Swede, Aprl 008 tme 0 Reder J. Brl, r..brl@tue.l TU/e Iformatca, System Archtecture ad Networg Reder J. Brl, r..brl@tue.l TU/e Iformatca, System Archtecture ad Networg Refuted aalyss for FS Refuted aalyss for FS Ehaced aalyss for FS s pessmstc example 4 Ehaced aalyss for FS s optmstc a ext ob may mss ts deadle tas T C B τ 5 4 τ 7 7 + tas τ tas τ 7 tas τ tas τ.6.6.6 4..8 Leged: deadle mss τ 0 0 + 0 tas τ tme 5 7 aalyss yelds ( ) = 9 pessmstc, because blocg s actually (B ) + 0 tme cause: the fal sub-ob defers hgher prorty tass, causg hgher terferece for ext obs of τ Mälardale Uversty, Swede, Aprl 008 Mälardale Uversty, Swede, Aprl 008
Reder J. Brl, r..brl@tue.l TU/e Iformatca, System Archtecture ad Networg Reder J. Brl, r..brl@tue.l TU/e Iformatca, System Archtecture ad Networg Refuted aalyss for FS Revsed aalyss for FS Aalyss for deadles at most equal to perods: thy shall loo beyod the frst ob for FS ad tass wth varyg prortes: M. Gozález Harbour et al., RTSS 99; for preempto threshold schedulg: J. Regehr, RTSS 00; for FS: R.J. Brl, W ECRTS 006; for FNS ad CAN: R.J. Brl et al., RTN 006; for EF: M. Spur, Tech. Rep. INRIA 996. Ma amedmets resolvg the pessmsm: approach: rephrase crtcal stat; use (B ) + rather tha B, ad let ote: problem does ot occur for lowest prorty tas τ, because τ s ot bloced by other tass; resolvg the optmsm: approach: cosder all obs a actve perod; ote: problem does ot occur for hghest prorty tas τ, because τ does ot bloc other tass; Mälardale Uversty, Swede, Aprl 008 Mälardale Uversty, Swede, Aprl 008 4 Reder J. Brl, r..brl@tue.l TU/e Iformatca, System Archtecture ad Networg Reder J. Brl, r..brl@tue.l TU/e Iformatca, System Archtecture ad Networg Revsed aalyss for FS Revsed aalyss for FS Resolvg the pessmsm rephrase crtcal stat of τ : smultaeous release wth all hgher prorty tass; sub-ob wth max. blocg B starts earler; use (B ) + rather tha B, ad let 0 lm = ( ) - where ( B + C F ) + F for < ( ) = ( C ( F )) + F for = Resolvg the pessmsm ef.: worst-case occuped tme WO (C) WO ( C) = lm ( C + ) worst-case occuped tme WO of tas s the smallest x R + satsfyg x x = C + + C T < ca be solved by meas of a teratve procedure Mälardale Uversty, Swede, Aprl 008 5 Mälardale Uversty, Swede, Aprl 008 6 Reder J. Brl, r..brl@tue.l TU/e Iformatca, System Archtecture ad Networg Reder J. Brl, r..brl@tue.l TU/e Iformatca, System Archtecture ad Networg Revsed aalyss for FS Revsed aalyss for FS Resolvg the pessmsm ef.: worst-case occuped tme WO (C) WO ( C) = lm ( C + ) we ow get: lm = lm ( ( B + C F ) + F ) 0 ( ( C ( F )) + F ) ( B + C F ) + F = WO ( C F ) + F for < for = for < for = Resolvg the optmsm oto of level- actve perod: (cumulatve) pedg load (t): amout of processg at tme t that stll eeds to be performed for the obs of tass τ wth that are released before tme t. level- actve perod s a terval [t s, t e ), where: (t s ) = 0; (t e ) = 0; (t) > 0 for t (t s, t e ). level- actve perod eds whe U <, or U = ad lcm of perods exst Mälardale Uversty, Swede, Aprl 008 7 Mälardale Uversty, Swede, Aprl 008 8
Reder J. Brl, r..brl@tue.l TU/e Iformatca, System Archtecture ad Networg Revsed aalyss for FS Resolvg the optmsm example (FS) tas T C τ τ 4 tas τ tas τ 0 level- actve perod tme Leged: preempto executo release Reder J. Brl, r..brl@tue.l TU/e Iformatca, System Archtecture ad Networg Revsed aalyss for FS Resolvg the optmsm crtcal stat of τ the worst-case respose tme s assumed a level- actve perod, that starts wth a smultaeous release wth all hgher prorty tass, where sub-ob wth max. blocg B starts earler; worst-case legth WL of a level- actve perod s the smallest x R + satsfyg x = B + x C T level- busy perod Mälardale Uversty, Swede, Aprl 008 9 Mälardale Uversty, Swede, Aprl 008 0 Reder J. Brl, r..brl@tue.l TU/e Iformatca, System Archtecture ad Networg Reder J. Brl, r..brl@tue.l TU/e Iformatca, System Archtecture ad Networg Revsed aalyss for FS Revsed aalyss for FS Resolvg the optmsm worst-case respose tme = max, 0 < wl where WL wl = T, ( B + ( + ) C F ) + F T = WO (( + ) C F ) + F T for < for = Resolvg the optmsm teratve procedure (0) =,0 ( l+ ) ( l ) = max(,, l+ ) l=0,, procedure stops whe exceeds,, or the level- actve perod s over,.e. ( B + ( + ) C ) ( + ) T Note: smlar codto as for FS ad > T Kle et al., RMA Hadboo, KA, 99. Mälardale Uversty, Swede, Aprl 008 Mälardale Uversty, Swede, Aprl 008 Reder J. Brl, r..brl@tue.l TU/e Iformatca, System Archtecture ad Networg Reder J. Brl, r..brl@tue.l TU/e Iformatca, System Archtecture ad Networg Remars Coclusos Cotuous schedulg suprema, rather tha maxma, for < : blocg tme B worst-case legth WL of actve perod worst-case respose tme crtcal stat o-uform aalyss (τ caot be bloced) Aalyss of Cotroller Area Networ (CAN) same problem (FNS); see RTN 006; evolutoary mprovemet of flawed aalyss: uform for all tass ( ) see Real Tme Systems Joural of Aprl 007 Exstg aalyss for FS s both pessmstc ad optmstc Revsed aalyss resolved pessmsm: rephrased crtcal stat; used (B ) + rather tha B ; ad let resolved optmsm cosdered all obs actve perod; o-uform, because τ caot be bloced Ehaced tas-model based o a AG Mälardale Uversty, Swede, Aprl 008 Mälardale Uversty, Swede, Aprl 008 4 4
Reder J. Brl, r..brl@tue.l TU/e Iformatca, System Archtecture ad Networg Reder J. Brl, r..brl@tue.l TU/e Iformatca, System Archtecture ad Networg Refereces Acowledgemets R.J. Brl, J.J. Lue ad W.F.J. Verhaegh, Worstcase respose tme aalyss of real-tme tass uder fxed-prorty schedulg wth deferred preempto revsted wth extesos for ECRTS 07, CS-report 07-, Techsche Uverstet Edhove (TU/e), The Netherlads, Aprl 007. R.J. Brl, J.J. Lue, ad W.F.J. Verhaegh, Worstcase respose tme aalyss of real-tme tass uder fxed-prorty schedulg wth deferred preempto revsted, I: roc. 9th Euromcro Coferece o Real-Tme Systems (ECRTS 07), pp. 69 79, July 007. Joha J. Lue ad Wm F.J. Verhaegh Ala Burs ad Robert I. avs (Uversty of Yor) IST-00457 fuded ARTIST Networ of Excellece o Embedded Systems esg Ramo A.W. Clout ad Ja H.M. Korst (hlps Research Laboratores) aoymous referees of the ECRTS 007 Mälardale Uversty, Swede, Aprl 008 5 Mälardale Uversty, Swede, Aprl 008 6 Reder J. Brl, r..brl@tue.l TU/e Iformatca, System Archtecture ad Networg Reder J. Brl, r..brl@tue.l TU/e Iformatca, System Archtecture ad Networg Uform (pessmstc) aalyss I Uform (pessmstc) aalyss II Remember By defto, (C) WO (C), hece a uform (pessmstc) aalyss I:,,, ( B + ( + ) C F ) + F T for < = WO (( + ) C F ) + F T for =, = WO ( B + ( + ) C F ) + F T By defto, (C) WO (C), hece a uform (pessmstc) aalyss I: Moreover, WO (C) (C+ ), hece a uform (pessmstc) aalyss II:,,,,, = WO ( B, + ( + ) C F ) + F T, = ( B + ( + ) C ( F )) + ( F ) T Mälardale Uversty, Swede, Aprl 008 7 Mälardale Uversty, Swede, Aprl 008 8 5