EDA/DIT6 Real-Tme Sysems, Chalmers/GU, 0/0 ecure # Updaed February, 0 Real-Tme Sysems Specfcao Problem: Assume a sysem wh asks accordg o he fgure below The mg properes of he asks are gve he able Ivesgae he schedulably of he asks whe EDF s used (Noe ha D < T for all asks) Implemeao Verfcao Dyamc schedulg -- Earles-deadle-frs schedulg Processor-demad aalyss Task C D T 8 Feasbly aalyss for EDF Smulae a execuo of he asks: 0 6 8 The asks are o schedulable eve hough U = + + 8 = 7 8 = 0875 < msses s deadle! Wha aalyss mehods are suable for geeral EDF: Ulzao-based aalyss? No suable! No geeral eough or exac eough Does o work well for he case of D < T Respose-me aalyss? No suable! Aalyss much more complex ha for DM Crcal sa does o ecessarly occur whe all asks arrve a he same me for he frs me Isead, respose me of a ask s maxmzed a some scearo where all oher asks arrve a he same me; he wors such scearo has o be defed for each ask before he respose me of ha ask ca be calculaed
EDA/DIT6 Real-Tme Sysems, Chalmers/GU, 0/0 ecure # Updaed February, 0 Processor-demad aalyss Processor demad: The processor demad for a ask a gve me erval [ 0, ] s he amou of processor me ha he ask eeds he erval order o mee he deadles ha fall wh he erval e N represe he umber of saces of ha mus complee execuo before The oal processor demad up o s (0, ) = = N C Processor-demad aalyss Processor demad: N We ca calculae by coug how may mes ask has arrved durg he erval 0, D We ca gore saces of he ask ha arrved durg he erval D, sce D > for hese saces 0 Isace wh D > N = N = Processor-demad aalyss Processor-demad aalyss: N We ca express as N = D T + The oal processor demad s hus (0, ) = = D T + C Exac feasbly es for EDF (Suffce ad ecessary codo) A suffce ad ecessary codo for earlesdeadle-frs schedulg, for whch, s D T : (0, ) where (0, ) s he oal processor demad [ 0, ] The processor-demad aalyss ad assocaed feasbly es was preseed by S Baruah, Roser ad R Howell 990
EDA/DIT6 Real-Tme Sysems, Chalmers/GU, 0/0 ecure # Updaed February, 0 Exac feasbly es for EDF (Suffce ad ecessary codo) How large erval mus be examed? arges erval s CM of he ask s perods Ths erval ca be furher shoreed (see course book) How may me pos mus be examed? Oly absolue deadles eed o be examed The se of deadles ca be furher reduced (see course book) The es ca cosequely be mproved as follows: K = K : (0, ) { D k D k = kt + D, D k CM{ T,,T },, k 0} Problem: Assume a sysem wh asks accordg o he fgure below The mg properes of he asks are gve he able a) Deerme, by aalyzg he processor demad, wheher he asks are schedulable or o usg EDF b) Deerme, by usg smulao, wheher he asks are schedulable or o usg EDF We solve hs o he blackboard! Task C D T 7 8 6 Exeded processor-demad aalyss Deadle verso The es ca be exeded o hadle: Blockg Sar-me varaos ( release jer ) Tme offses H ormal execuo crcal rego H blocked H ad share resource R H msses s deadle I hs course, we oly sudy blockg M
EDA/DIT6 Real-Tme Sysems, Chalmers/GU, 0/0 ecure # Updaed February, 0 Sack Resource Polcy (SRP) The asks are assged preempo levels, he properes of whch are: The preempo level of ask s deoed π Task s o allowed o preemp aoher ask j uless π If has hgher prory ha j ad arrves laer, he mus have a hgher preempo level ha Noe: - The preempo levels are sac values, eve hough he asks prores may be dyamc - For EDF schedulg, suable levels ca be derved f asks wh shorer relave deadles ge hgher preempo levels, ha s: π D < D j j Sack Resource Polcy (SRP) Deadle verso ca be reduced wh resource celgs: Each shared resource s assged a celg ha s always equal o he maxmum preempo level amog all asks ha may be blocked whe requesg he resource The proocol keeps a sysem-wde celg ha s equal o he maxmum of he curre celgs of all resources A ask wh he earles deadle s allowed o preemp oly f s preempo level s hgher ha he sysem-wde celg Noe: The orgal prory of he ask s o chaged a ru-me The resource celg s a dyamc value calculaed a ru-me as a fuco of curre resource avalably Oherwse, he behavor of he SRP proocol s very smlar o he ICPP, ad SRP also exhbs decal properes regardg maxmum blockg me ad freedom from deadlock Sack Resource Polcy (SRP) Exeded processor-demad aalyss H M preempo level (H) > preempo level (M) > preempo level () ormal execuo H ad share resource R crcal rego sysem-wde celg s se o R s resource celg (= H s preempo level) H blocked sysem-wde celg s resored Blockg ca be accoued for he followg way: B Blockg facor represes he legh of crcal / opreempve regos ha are execued by asks wh lower preempo levels ha Tasks are dexed he order of creasg preempo levels, ha s: π < j K, [, ]: (0, ) Aga: oe he smlary o he behavor of ICPP D = k T k + C k + k = D T + B
EDA/DIT6 Real-Tme Sysems, Chalmers/GU, 0/0 ecure # Updaed February, 0 Exeded processor-demad aalyss Deermg he blockg facor for ask : Deerme he wors-case resource celg for each crcal rego, ha s, assume he ru-me suao where he correspodg resource s uavalable Idefy he asks ha have a preempo level lower ha ad ha calls crcal regos wh a wors-case resource celg equal o or hgher ha he preempo level of Cosder he mes ha hese asks lock he acual crcal regos The loges of hose mes cosues he blockg facor B Problem: Assume a sysem wh asks accordg o he fgure below The mg properes of he asks are gve he able Three resources R, R ad R have hree, oe, ad hree us avalable, respecvely The parameers H R, H R ad H R represe he loges me a ask may use he correspodg resource The parameers μ R, μ R ad μ R represe he umber of us a ask requess from he correspodg resource Task Task C D D T 6 0 50 7 7 50 R R R 0 5 50 H R H R - H R μ R μ R μ R - Feasbly ess Problem: (co d) Task frs requess R ad he, whle usg R, requess R Task frs requess R ad he, whle usg R, requess R; he, afer releasg he wo resources, requess R Task frs requess R ad he, whle usg R, requess R; he, afer releasg he wo resources, requess R Exame he schedulably of he asks whe he SRP (Sack Resource Polcy) proocol s used a) Derve he celgs (dyamc ad wors-case) of he resources b) Derve he blockg facors for he asks c) Show wheher he asks are schedulable or o We solve hs o he blackboard! Sac prory (RM/DM) Dyamc prory (EDF) U ( / ) U Summary D = T D T : R = C + : = j hp() D T R T j C j D + C 5