End-to-End Schedulng Framework 1. Tak allocaton: bnd tak to proceor 2. Synchronzaton protocol: enforce precedence contrant 3. Subdeadlne agnment 4. Schedulablty analy Tak Allocaton Bn-Packng eurtc: Frt-Ft Subtak agned n arbtrary order To allocate a new ubtak T,j If T,j can be added to an extng proceor P l (1 l k) wthout exceedng t capacty, allocate T,j to P k Ele add a new proceor P k+1 and allocate T,j to t. Chenyang u CSE 467S 1 Chenyang u CSE 467S 2 Performance lmt of Frt-Ft Number of proceor needed: m/m 0 -> 1.7 a m 0 -> m: number of proceor needed under Frt-Ft m 0 : mnmum number of proceor needed Frt-Ft can alway fnd a feable allocaton on m proceor f total ubtak utlzaton no greater than m(2 1/2-1) = 0.414m Aumng fxed-prorty chedulng, dentcal proceor Tak Allocaton to Mnmze Communcaton Cot Inter-ubtak communcaton can ntroduce overhead and delay E.g., Remote method nvocaton more expenve and lower than local nvocaton Goal: mnmze communcaton cot ubject to proceor capacty contrant Two tep Partton ubtak nto group Allocate group to proceor Chenyang u CSE 467S 3 Chenyang u CSE 467S 4 End-to-End Schedulng Framework 1. Tak allocaton: bnd tak to proceor 2. Synchronzaton protocol: enforce precedence contrant 3. Subdeadlne agnment 4. Schedulablty analy Synchronzaton Protocol Requrement Correct: Enforce precedence contrant Allow accurate chedulablty analy ow wort-cae repone tme ow overhead Reduce jtter ow average repone tme Chenyang u CSE 467S 5 Chenyang u CSE 467S 6
Greedy Protocol Releae job J,j;k a oon a J,j-1;k completed Subtak may not be perodc under a greedy protocol Dffcult for chedulablty analy gher-prorty tak arrve early hgh wortcae repone tme for lower-prorty tak Jtter can accumulate over multple hop Crtque on Greedy Protocol Correctne Allow chedulablty analy Wort-cae repone tme Jtter ow average repone tme Chenyang u CSE 467S 7 Chenyang u CSE 467S 8 Phae-Modfcaton Protocol (PMP) Idea: Enforce perodc releae baed on wort-cae repone tme Every job J,j;k releaed at tme + ( k 1) p j + 1 w l= 1, l : tart tme of job J,1;1 w l : wort cae repone tme of T l Aumpton Requre upper bound on the repone tme of all ubtak Requre global clock Crtque on PMP Incorrect f tak have releae jtter or overrun Allow chedulablty analy ow wort-cae repone tme : No explct ynchronzaton Depend on global clock ynchronzaton ow jtter gh average repone tme Chenyang u CSE 467S 9 Chenyang u CSE 467S 10 Modfed PMP Same a PMP except A ubtak cannot be releaed unle t predeceor ha been completed Aumpton Requre upper bound on the repone tme of all ubtak Requre a ync meage from predeceor ndcatng t predeceor ha been completed Doe not requre global clock ynchronzaton Indcate ahead tme n ync meage Crtque on MPMP Correct Allow accurate chedulablty analy ow wort-cae repone tme requre explct ynchronzaton Doe not requre global clock ync ow jtter gh average repone tme Chenyang u CSE 467S 11 Chenyang u CSE 467S 12
Releae Guard If proceor never dle nce lat releae tme r,k+1;j-1 releae J,k+1;j ether when t receve a ync meage from J,k;j or at tme r,k+1;j-1 +p, whchever later Ele: releae J,k+1;j when recevng a ync meage or when proceor become dle, whchever later. Improve average repone tme wthout affectng chedulablty at the cot of jtter RG Aumpton Aumpton Doe not requre upper bound on the repone tme of all ubtak Doe not requre global clock ynchronzaton Work bet for looely coupled ytem! Chenyang u CSE 467S 13 Chenyang u CSE 467S 14 Crtque on Releae Guard Correct Allow accurate chedulablty analy ow wort-cae repone tme requre explct ynchronzaton Doe not requre global clock ynchronzaton ow jtter (f rule 2 not ued) Improved average repone tme (f rule 2 ued) Chenyang u CSE 467S 15 Score Board: Sync protocol Greedy PMP MPMP RG Correct N Sched N WCRT Avg RT M/ / Chenyang u CSE 467S 16 Global Info. Jtter Ue MPMP or RG f Informaton about all tak are avalable a pror Sytem ha global clock ync Otherwe only RG can be ued Subdeadlne agnment Subdeadlne prorte under EDF & DM repone tme Optmal ubdeadlne agnment NP-hard Offlne: heurtc earch algorthm Onlne: mpler heurtc Subdeadlne Agnment eurtc Notaton (Relatve) deadlne d of tak T (Relatve) ubdeadlne d j of ubtak T j (1 j ) Slack of ubtak T j : j = d j -e j Ultmate Deadlne (UD): d j = d But ome ubtak mut fnh earler than the end-to-end deadlne! Effectve Deadlne (ED): d j = d Agn all lack to 1 t ubtak j 1 d k = 1 k k = j+ e 1 k Chenyang u CSE 467S 17 Chenyang u CSE 467S 18
More eurtc Proportonal Deadlne (PD): ej dj = d e k = 1 k Agn lack proportonally to executon tme Normalzed Proportonal Deadlne d e u( V j, j j = d = ( e ( k 1 ku V, k Agn more lack to ubtak on buer proceor ) )) Schedulng Sngle proceor Perodc tak Fxed prorty v. dynamc prorty Deadlne v. perod Reource contenton Aperodc + perodc tak Dtrbuted ytem Chenyang u CSE 467S 19 Chenyang u CSE 467S 20 Schedulng Aperodc Tak ybrd tak et: perodc tak + aperodc tak Problem: Arrval tme unknown Sporadc tak wth a hard deadlne Inter-arrval tme mut be lower bounded Schedulablty analy: treated a a perodc tak wth perod = mnmum nter-arrval tme Aperodc tak wth a oft deadlne Pobly unbounded nter-arrval tme Goal: mantan hard guarantee on perodc tak Reduce repone tme of aperodc tak Background Schedulng Treat aperodc tak a lowet-prorty tak Advantage Smple Aperodc tak ha no mpact on the chedulablty of perodc tak Dadvantage Aperodc tak have very long repone tme when the utlzaton of perodc tak hgh Acceptable only f Sytem not buy Aperodc tak can tolerate long delay Chenyang u CSE 467S 21 Chenyang u CSE 467S 22 Pollng Server Pollng erver (PS): a perodc tak ued to erve aperodc requet Perod: p Capacty: c Rule Releaed perodcally wth perod p Serve any pendng aperodc requet Supend telf f t ha ued up t capacty, or no aperodc requet pendng Server capacty replenhed to c n the next perod Schedulablty The aperodc requet have the ame mpact on perodc tak a a perodc tak. n tak wth m PS : U p + U U b (n+m) Can have multple PS (wth dfferent perod) for dfferent aperodc requet Dadvantage: If an aperodc requet me the executon of PS, t ha to wat tll the next perod long repone tme. Chenyang u CSE 467S 23 Chenyang u CSE 467S 24
Deferrable Server (DS) Unlke PS, DS preerve unued capacty untl the end of the current perod Better repone to aperodc requet owever, DS mpact on perodc tak dfferent from an perodc tak Utlzaton Bound wth DS U + 2 1/ n Under RMS U b = U + n 1 U + 2 A n : U b = U + ln When U = 0.186, mn U b = 0.652 Sytem chedulable f U p U + 2 ln Chenyang u CSE 467S 25 Chenyang u CSE 467S 26 Ponter Cla hand-out Rate Monotonc A Practtoner' andbook for Real-Tme Analy: Gude to Rate Monotonc Analy for Real-Tme Sytem, Klen et. al. EDF Deadlne Schedulng for Real-Tme Sytem: EDF and Related Algorthm, Stankovc et. al. General ard Real-Tme Computng Sytem, G. Buttazzo. Real-Tme Sytem, Jane u. Chenyang u CSE 467S 27