AN EXTENDIBLE APPROACH FOR ANALYSING FIXED PRIORITY HARD REAL-TIME TASKS

Size: px
Start display at page:

Download "AN EXTENDIBLE APPROACH FOR ANALYSING FIXED PRIORITY HARD REAL-TIME TASKS"

Transcription

1 AN EXENDIBLE APPROACH FOR ANALYSING FIXED PRIORIY HARD REAL-IME ASKS K. W. ndell 1 Department of Computer Scence, Unversty of York, England YO1 5DD ABSRAC As the real-tme computng ndustry moves away from statc cyclc executve-based schedulng towards more flexble process-based schedulng, so t s mportant for current schedulng analyss technques to advance and to address more realstc applcaton areas. hs paper extends the current analyss assocated wth statc prorty pre-emptve based schedulng; n partcular t derves analyss for tasks wth arbtrary deadlnes that may suffer release tter due to beng dspatched by a tck drven scheduler. We also consder bursty sporadc actvtes, where tasks arrve sporadcally but then execute perodcally for some bounded tme. he paper llustrates how a wndow-based analyss technque can be used to fnd the worst-case response tme of a task set, and shows that the technque can be easly extended to cope wth realstc and complex task characterstcs. 1. INRODUCION One commonly proposed way of constructng a hard real-tme system s to buld the system from a number of sporadc and perodc tasks, each assgned statc prortes, and dspatched at run-tme accordng to the statc prorty pre-emptve schedulng algorthm. he man thrust of research wth ths approach has been to derve a pror analyss that can bound the behavour of the tasks at run-tme. Orgnal work by Lu and Layland [11] provdes a pror analyss to determne f a set of perodc tasks would be guaranteed to meet ther deadlnes. ask deadlnes are taken to be at the end of the perods of the tasks, and tasks are not permtted to block at run-tme. Furthermore, each task s assgned a unque prorty monotoncally wth task perod, and hence the name rate monotonc schedulng. he analyss provdes a schedulablty test by gvng a utlsaton bound. he Lu and Layland analyss s suffcent (an essental property of any schedulablty test f the test passes a set of tasks then those tasks must always meet ther deadlnes) but not necessary (a measure of the effcency of the test f the test s necessary then a reected task set wll be unschedulable n the worst-case); Sha et al [9] extended the analyss to provde an exact test (.e. both suffcent and necessary). Sha et al [15] derved a run-tme algorthm to permt tasks to lock and unlock semaphores accordng to a protocol, termed the prorty celng protocol. Wth ths protocol a system s guaranteed to be free of deadlock (on sngle processor systems), and a gven task can be blocked at most once by a lower prorty task. Sha et al extended the rate monotonc analyss to account for the behavour of ths protocol, addng a blockng factor to the schedulablty equatons (the blockng factor accounts for the worst-case tme a gven task can be blocked). he prorty pre-emptve dspatchng algorthm has also been analysed by Joseph and Pandya [5] to fnd the worst-case response tme of a gven task. Analyss s derved that fnds the worst-case tme between a task beng released (.e. placed n a notonal prorty-ordered run-queue) and the task completng the executon of a worst-case requred computaton tme. hs permts task deadlnes to be less than task perods: the worst-case response tme can be compared to a statc deadlne. he optmal prorty orderng for tasks wth deadlnes less than perods has been shown to be the deadlne monotonc orderng [10]. Allowng task deadlnes to be less than task perods s useful for many real-tme applcatons: n dstrbuted systems deadlnes can be shortened to allow tme for messages to pass between processors [17]; for control systems nput and output tter can be controlled [12]. However, some real-tme applcatons are not so strngent, and can accept task deadlnes greater than task perods: a task s permtted to re-arrve before the prevous nvocaton has fnshed (and s then delayed untl the prevous nvocaton termnates). Lehoczky [8] descrbes qualtatve analyss whch can determne the worst-case response tme of a gven task wth such arbtrary deadlnes. Lehoczky ponts out that nether the rate monotonc 1 he author can be contacted by e-mal at ken@mnster.york.ac.uk 1

2 nor deadlne monotonc prorty orderng polces are optmal for tasks wth arbtrary deadlnes. We wll reproduce here an algorthm whch fnds the optmal prorty orderng for any task set. Many statc prorty pre-emptve dspatchers are mplemented usng tck schedulng a perodc clock nterrupt runs the scheduler; a budget tmer ensures that control s returned to the scheduler f a task exceeds ts permtted worst-case executon tme. One of the problems wth pure tck schedulng s that sporadc task arrvals are polled by the scheduler, whch means that a sporadc task can arrve (.e. want to run) but be delayed before beng released. It s then possble that ths leads to so-called release tter: varablty n the release of a task (by at most the tck perod). Perodc tasks whch have a perod that s not an nteger multple of the tck perod can also n general suffer a release tter. hs release tter leads to the possblty of a task appearng to arrve sooner than the worst-case nter-arrval tme, and volates the assumptons of current analyss. Rakumar [14] extends the exact rate monotonc analyss of Lehoczky et al [9] to permt tasks to be blocked on an external event (release tter s a specal case of external blockng) n order to permt the prorty celng protocol to be extended to dstrbuted systems. However, these extensons result n a non-exact test; we wll derve exact analyss whch accounts for release tter. Some real-tme systems have tasks that behave as so-called sporadcally perodc tasks [2]: a task arrves at some tme, executes perodcally for a bounded number of perods (called nner perods), and then does not re-arrve for a larger tme (called the outer perod). Examples of such tasks are nterrupt handlers for bursty nterrupts (for example, packet arrvals from a communcatons devce), or certan montorng tasks. Exstng analyss s not exact (and hence pessmstc) for these tasks: tasks would be assumed to execute contnuously at ther nner perod rate. We wll derve exact analyss for tasks wth ths behavour. hs paper wll derve analyss for statc prorty pre-emptve systems that permts tasks to have arbtrary deadlnes, release tter, and behave as sporadcally perodc tasks. he dervaton of ths analyss wll llustrate how usng a wndow approach to fndng worst-case response tmes for these tasks s an approprate way of obtanng an analyss talored to the behavour of real real-tme tasks. hs approach s easly extended to deal wth other applcaton characterstcs. he paper s structured as follows: Secton 2 wll descrbe the computatonal model assumed throughout ths paper, and defne the notaton used. Secton 3 wll derve basc analyss from that of Joseph and Pandya and extend t to permt arbtrary deadlnes, usng the approach of Lehoczky. Secton 4 wll extend the analyss to permt release tter to be accounted for. Secton 5 wll further extend the analyss to be exact for sporadcally perodc tasks. Secton 6 wll also dscuss the mplementaton of statc prorty pre-emptve dspatchng usng tmer nterrupts (.e. tck schedulng); the analyss wll be extended to exactly account for the overheads due to ths means of schedulng. Secton 7 wll gve an algorthm to fnd the optmal prorty orderng for a task set. Secton 8 wll summarse the schedulng theory developed. Secton 9 wll present an example task set and determne the worst-case response tmes of each task n the set. Appendx A gves a table of notaton used n ths paper. Appendx B gves detals on how a program mplementng the analyss descrbed n ths paper can be obtaned. 2. COMPUAIONAL MODEL AND ASSUMPIONS A number of tasks are statcally assgned to a sngle processor. asks have unque prortes; the run-tme system provdes pre-emptve prorty-based dspatchng. Each task may lock and unlock semaphores accordng to the prorty celng protocol [15] (or equvalent [3]); although tasks are assgned unque statc prortes, they may have ther prortes temporarly ncreased due to prorty nhertance (as part of the operaton of the prorty celng protocol). asks can arrve at any tme (.e. want to run), but can be delayed for a varable but bounded amount of tme (termed the release tter) before beng placed n a notonal prorty-ordered run-queue (.e. released). asks are gven a worst-case nterarrval tme, termed the perod (): a task cannot re-arrve sooner than ths tme. For each arrval a task may execute a bounded amount of computaton, termed the worst-case executon tme (C). hs value s deemed to contan the overheads due to context swtchng. he cost of pre-empton, wthn the model, s thus assumed to be zero. he worst-case response tme of a task (r) s the longest tme ever taken by that task from the tme t arrves untl the tme t completes ts requred computaton. If a task has a worst-case response tme greater than ts perod then the possblty exsts for a task to re-arrve before the prevous nvocaton has completed. here are two ways of dealng wth ths 2

3 stuaton: the prevous nvocaton s deemed to have a lower prorty than the new arrval, and the new arrval pre-empts the old, or the new arrval s deemed to have a lower prorty, and s therefore delayed from executng untl after the prevous nvocaton termnates. We adopt the latter approach for several reasons: the mplementaton of ths approach s easer, snce the run-tme system does not have to support concurrent threads of the same task. Also, t makes lttle sense to have a task processng an event earler n tme delayed by the processng of a later one; a general rule n real-tme systems s to preserve the order of events. Fnally, the worst-case response tme bounds derved are n general lower than those found f an earler nvocaton s pre-empted. Sporadcally perodc tasks are assgned two perods: the nner perod (t) and the outer perod (). he outer perod s the worst-case nter-arrval tme between bursts ; the nner perod s the worst-case nter-arrval tme between tasks wthn a burst. here are a bounded number of arrvals to each burst; furthermore, the total tme for the burst (.e. the number of nner arrvals multpled by the nner perod) must be less than or equal to the outer perod. A task that s not a bursty task s smply modelled as one that has an nner perod equal to the outer perod, and at most one nner arrval. 3. BASIC ANALYSIS AND ARBIRARY DEADLINES hs secton derves smple analyss for the computatonal model descrbed above. We assume that there s no release tter and that tasks are not sporadcally perodc. Joseph and Pandya [5] derved smple analyss to fnd the worst-case response tme of a gven task, assumng sporadc tasks wth mnmum nter-arrval tmes, and worst-case computaton tmes. he analyss assumes a crtcal nstant, where all tasks are assumed to be released together; ths s the worst-case schedulng scenaro for smple tasks. he followng analyss gves the worst-case response tme of a task (r ), assumng that all tasks are released as soon as they arrve, and that tasks do not suspend themselves (see Appendx A for a summary of the notaton used): r = C + hp( ) r C As can be see, the response tme r appears on both sdes of the equaton. Joseph and Pandya gve a method for evaluatng the equaton, but a smple approach can be used by teratng to a soluton: n + 1 r = C + hp( ) r n C (1) Where r 0 = C heorem 3.1 Proof: If the utlsaton of the hghest prorty levels s less than 1, then the sequence r n converges to r (the task completon tme) n a fnte number of steps (.e. there exsts an n such that r n+1 = r n ) See ndell [16] or Joseph and Pandya [5] he task meets ts deadlne f and only f r s less than or equal to D, the deadlne of task. If the sequence converges to a value of r greater than then the value s nvald, snce the computaton of prevous nvocatons of has not been accounted for. For systems wth task deadlnes less than task perods (.e. D ) ths s not a problem, snce such a value of r would result n an unschedulable task anyway. However, for the arbtrary deadlne stuaton the equaton s no longer suffcent. 3

4 Lehoczky [8] descrbes qualtatve analyss to determne the schedulablty of a task set wth arbtrary deadlnes. he approach uses the noton of busy perods : a level busy perod s defned as the maxmum tme for whch a processor executes tasks of prorty greater than or equal to the prorty of task. Lehoczky shows how the worst-case response tme of a task can be found by examnng a number of wndows, each defned to be the length of the busy perod startng at the wndow, and each wndow startng at an arrval of task (hence at some multple of before the current nvocaton of task ). A number of wndows back n tme need to be examned to fnd the worst-case response tme (n general, the worst-case response tme can be the response tme correspondng to any one of the wndows). Fgure 1 llustrates ths. hgh hgh task hgh C hgh r task C task low 1st 2nd 3rd 4th 5th nvocatons of task level busy perod Fgure 1: a level busy perod over fve nvocatons of task Fgure 1 shows part of the executon of a three task system: task hgh s a hgh prorty task (ncluded merely for llustratng response tmes of task ), task s of medum prorty (and can arrve before ts prevous nvocaton has completed), and task low s the lowest prorty task (ncluded to llustrate the length of the level busy perod). me flows from left to rght across the dagram. A task executng for some tme s depcted as a shaded rectangle. he pre-empton of a task s depcted as a whte rectangle. he response tme of a task s therefore the length of the whole rectangle. he level busy perod s llustrated (the busy perod ends when task low s able to begn executon). o fnd the worst-case response tme all fve nvocatons of task n ths busy perod must be examned (n the dagram, the thrd nvocaton of task s delayed the longest, and ths response tme s the worst-case response tme). In the followng dscusson the current nvocaton of task s assumed to be the last (.e. ffth) nvocaton. For a level busy perod startng at tme q before the release of the current nvocaton of task we can extend the orgnal analyss by fndng the computaton that starts n ths perod: w ( q) w ( q) = ( q + 1 ) C + C (2) hp( ) he value of w (q) can agan be found by teraton, wth w (q) 0 = (q + 1)C ; a faster convergence can be obtaned by observng that w (q + 1) w (q), and hence w (q) 0 = w (q 1) wll converge faster, wth w (0) 0 = C. Notce how all the computaton of prorty or hgher startng n the wndow s accounted for; the term qc accounts for the computaton of prevous nvocatons of task startng n the wndow. Now, the frst q of the level busy perod falls 4

5 before the current nvocaton of task s released, and hence cannot contrbute to the response tme. he response tme correspondng to the wndow startng q before the current nvocaton of task s therefore gven by: (w (q) q ) Now, as mentoned above, the worst-case response tme can occur at any one of these response tmes, and thus the worstcase response tme s gven by: r = max w ( q ) q q= 0, 1, 2,... he wndows for ncreasng values of q need to be determned. he sequence s fnte, however, because the search can stop f a level busy perod s found whch fnshes before task starts (.e. the processor s released to process lower prorty tasks) snce the processor s executng lower prorty tasks there can be no mpact on task from prevous nvocatons of task n busy perods startng earler. hus the above teraton over ncreasng values of q can stop f: (3) w (q) (q+1) he above analyss s llustrated by consderng agan fgure 1: the thrd nvocaton of task (.e. q = 2) fnshes at tme w, where w s equal to 2C hgh + 3C (ths s the value of w to whch equaton 2 converges when q = 2). he thrd nvocaton of task s released at tme 2, and therefore the response tme of ths nvocaton s 2C hgh + 3C 2. After evaluatng the response tmes for all fve nvocatons startng n the busy perod t can be seen that ths s the largest response tme (.e. the worst-case response tme). We can now see that the orgnal analyss s a specal case of the above analyss: the orgnal equaton (Equaton 1) s equvalent to equaton 2 wth q = 0. No wndows startng earler need be consdered, snce we constran D, and hence w (0), to be less than. At ths pont t s approprate to dscuss the extensons needed to analyse the prorty celng protocol. he protocol has the property that any task can only be blocked at most once by a lower prorty task. In fact, a stronger asserton can be proved: that durng a level busy perod there can be at most one blockng due to a task of lower prorty than. hs can be seen by consderng the operaton of the prorty celng protocol: at any tme only one task of lower prorty than can hold a semaphore wth celng greater (or equal to) the prorty of. hus any task executng n the level busy perod can only be blocked at most once. When ths task termnates the processor wll contnue to execute at a prorty greater than or equal to untl the end of the level busy perod. No task lower than the prorty of can execute (and hence cannot lock a semaphore). herefore the level busy perod can be blocked at most once by tasks of lower prorty than. he wndow denoted w (q) represents the executon of a level busy perod startng at tme q before the release of the nvocaton of we are consderng. he wndow w (q) ncludes computaton from multple nvocatons of task and hgher prorty tasks. o allow for blockng tme we need only add the term B (equal to the longest crtcal secton of a semaphore of celng prorty greater than or equal to that of task, where the crtcal secton s executed by a task of prorty lower than task ). he above analyss leads to the followng theorem: heorem 3.2 he worst-case response tme of a task s gven by: r = max w ( q ) q q= 0, 1, 2,... 5

6 where w (q) s gven by: w ( q) w ( q) = ( q + 1 ) C + B + C (4) hp( ) Proof: Follows drectly from the dervaton of the relatons descrbed above 4. HE RELEASE JIER PROBLEM So far we have assumed that as soon as a task arrves t s released. In general ths s not the case (a task may be delayed by the pollng of a tck scheduler, or perhaps awatng the arrval of a message), and the above equatons must be extended to nclude ths release tter tme. he release tter problem occurs when the worst-case tme between successve releases of a task s shorter than the worstcase tme between arrvals of a task. Consder the followng scenaro: a task, of hgher prorty than task, arrves at tme 0. At a later tme J later task s released (perhaps s a sporadc whch must be polled for by a tck scheduler). At the same tme task s released. ask mmedately pre-empts task, as expected. At tme task re-arrves. hs tme s mmedately released (perhaps arrved ust before the tck scheduler pollng perod). From the vew of task, task has arrved wth tme J between arrvals (Fgure 2). he current schedulng equatons do not cater for ths stuaton, and hence must be modfed. task J task r Fgure 2: the problem of release tter Over a large number of perods task wll execute at the perod, but over a short perod of tme (between ust two successve nvocatons of ) ths rate s optmstc. Now, the worst-case schedulng scenaro for ths short-term nter-arrval compresson s as descrbed above: a task s released at the same tme as the level busy perod. Wthout release tter the total pre-empton tme would be ac (where a s a postve nteger); f release tter s accounted for an extra preempton could occur, gvng a total pre-empton of tme (a + 1)C. hs occurs f: a < w ( q) + J ( a + 1 ) and ( a 1) < w ( q) a.e.: a < w ( q) + J a + 1 and a 1 < w ( q) a Lemma he pre-empton due to hgher prorty tasks s gven by: hp( ) J + w ( q) C 6

7 Proof: Follows drectly from the defnton of release tter. hgh J C r w (5) starts here level busy perod 1st 2nd 3rd 4th 5th 6th nvocatons of task Fgure 3: release tter and busy perods We now consder the on effects of D > and release tter. ask tself could potentally suffer release tter (as descrbed n the prevous secton), and thus the level busy perods from prevous nvocatons of task can start J later (Fgure 3). hs does not affect the computaton from startng n w (q) (t remans at (q + 1)C ), but does affect the correspondng response tme: the wndow w (q) needs to start J later than the frst nvocaton of n the busy perod, and hence equaton 3 s updated to: r = max w ( q ) + J q = q 0, 1, 2, 3,... For completeness we menton that the equatons are stll correct n the case when J s large (>> ): the equatons predct that, n the worst-case, a number of nvocatons of could be released smultaneously. hs s exactly what could happen n the worst-case: suppose that task was a packet nterrupt handler (processng packets from a broadcast bus). If a tck scheduler polled for the release of task and had a pollng perod tck >> (.e. several packets could arrve between scheduler tcks) then all outstandng packets would have to be processed by task, takng at most C computaton tme for each packet. hus a lower prorty task released at the same tme would be pre-empted for a long tme, and thus the equatons for release tter handle the case when the release tter s large. (5) 7

8 5. SPORADICALLY PERIODIC ASKS hs secton descrbes how the schedulablty analyss of the prevous secton can be updated to determne exactly worstcase response tmes when tasks can behave as sporadcally perodc tasks: executng wth an nner perod (t ) and outer perod ( ). Frstly, we have to place some restrctons on the model: we must have the bursty behavour fnshng before the next burst (.e. n t ). We also assume that the release tter J s the nner release tter (.e. each nvocaton of task can suffer ths tter). heorem 5.1 he worst-case response tme of task s gven by: r = max w ( q ) + J mt M q= 0, 1, 2, 3,... where m s gven by: m = q Mn and q M = n and where w (q) s gven by: w ( q) = M n + m + 1 C + B + mn n, hp( ) J + w ( q) F t + F n C and F s gven by: F = J + w ( q) Proof: We adopt the same approach to fndng the worst-case response tme as before: a number of wndows are examned and the response tme correspondng to each s determned. he worst-case response tme s the maxmum of these response tmes. However, nstead of examnng wndows startng at tme J + q before the current release of a task we have to also consder wndows startng at J + qt before the release of task. 8

9 M=1 J t 2t m=2 wndow w (q) starts here We are examnng ths nvocaton of Fgure 4: sporadcally perod tasks; n = 3, q = 5 Frstly we consder the computaton occurrng n the wndow w (q) from prevous nvocatons of task. We defne two ntegers M and m, where M s the number of outer perods prevously that the wndow w starts at, and m s the number of nner perods (Fgure 4). M and m are gven by: M = q n m = q Mn where q s an nteger 0. From fgure 4 t can be seen that the wndow starts at tme m t + M J before the current release of task. he total computaton from prevous nvocatons of task startng n the wndow w (q) s gven by: M n C + m C (6) Consder now the computaton occurrng n the wndow w (q) from hgher prorty sporadcally perodc tasks. If the wndow w (q) s larger than a number of bursts of then the computaton from each burst amounts to n C. For the partal burst startng n w (q) we can treat as a smple perodc task executng wth perod t over the remanng part of w (q). he whole number of bursts startng and fnshng n w (q) s gven by: F = J + w ( q) the remanng part of the wndow w (q) s of length J + w (q) F, and hence a bound on the number of nvocatons of n ths remanng tme s: J + w ( q) F t Another bound on the number of nvocatons n ths tme s n, snce a burst can consst of at most n nvocatons of task. herefore the least upper bound can be taken: mn n, J + w ( q) F t 9

10 hus the total computaton from all hgher prorty tasks occurrng n the wndow w (q) s: hp( ) mn n, J + w ( q) F t + F n C (7) and hence the theorem s derved. Note that when evaluatng the worst-case response tme for a task the teraton can stop as soon as w (q) M + m t J 6. ICK SCHEDULING ck schedulng s a common way of mplementng a prorty pre-emptve scheduler: a perodc clock nterrupt runs a scheduler whch polls for the arrvals of tasks; any arrved tasks are placed n a notonal prorty ordered run-queue. he scheduler then dspatches the hghest prorty task on the run-queue. Sporadc tasks can arrve at any tme, and hence suffer a worst-case release tter of clk, the perod of the tck scheduler. Perodc tasks, n the general case, can also arrve at any tme. However, a task wth a perod that s a multple of clk, and defned to arrve at a tck nterrupt, has a release tter of zero. Our motvaton for pollng for sporadcs s a safety one: f sporadcs were released by a processor nterrupt ntated by the arrval condton of the sporadc then some mechansm must exst to prevent the nterrupt re-occurrng before the worst-case re-arrval tme. If sporadcs are polled then the scheduler can decde not to release a sporadc f the mnmum nter-arrval tme has been volated. he overheads due to operatng tck schedulng can be accurately determned by applyng the same schedulng analyss as descrbed n prevous sectons. Before applyng the analyss we wll brefly descrbe some mportant characterstcs of certan tck schedulng mplementatons. A common way of mplementng tck schedulng s to use two queues: one queue holds a deadlne ordered lst of tasks whch are awatng ther start condtons (such as a start tme for perodcs, or a start event such as a value n an I/O regster for sporadcs); we denote ths queue the pendng queue. he other queue s a prorty-ordered lst of runnable tasks, denoted the run queue. At each clock nterrupt the scheduler scans the pendng queue for tasks whch are now runnable and transfers them to the run queue. When a runnng task termnates t executes a system call (on a famly processor ths s called a trap ) to transfer the task back to the pendng queue to awat the start condton for the next nvocaton (of course, for a task wth deadlne greater than perod the start condton may already be true, and the task can be returned mmedately to the run queue). he overheads due to ths call can be allowed for by treatng the call as a crtcal secton of the callng task, guarded by a semaphore wth a celng equal to the hghest prorty task n the system. Most mplementatons of such a queung system have the followng characterstc: the computaton cost to take a task from the pendng queue to the run queue s lower f more than one task s taken at the same tme. For example, n one mplementaton of a run-tme system at York [4] the worst-case cost to handle a tmer nterrupt s 66µs; the cost to take the frst task from the pendng queue s another 74µs (we denote ths tme C QL ). For each subsequent task removed (as part of the processng wthn the same nterrupt) the cost s 40µs (we denote ths tme C QS ). hs s because there are one-off costs assocated wth settng up loops, etc. hese costs are worst-case computaton tme costs wth the processor cache dsabled. We now develop analyss to accurately account for these overheads. he costs of the perodc tmer nterrupt can be modelled as a smple task, wth worst-case computaton tme C clk and perod clk ; wthn a tme wndow of wdth w the worst-case number of tmer nterrupts s gven by: L = w clk 10

11 Now, wthn the same wndow the worst-case number of tmes tasks move from the pendng queue to the run queue s (from equaton 7) gven by: K = J + w F mn, n t tasks + n F If, over a wndow of wdth w, the total number of task queue moves, K, s less than the number of clock nterrupts L, then n the worst-case all of the queue manpulatons are full cost (.e. each takng a worst-case computaton tme of C QL ), and the full cost of tck schedulng overheads s: LC clk + KC QL If, over w, K s greater than L then only the frst L task queue moves are at the full cost C QL ; the remanng K L requre only C QS each. Hence the tck schedulng overheads for a task over a wndow of wdth w are: LC clk + mn(l, K)C QL + max(k L, 0)C QS 7. OPIMAL PRIORIY ORDERING As has been mentoned before nether the deadlne monotonc nor rate monotonc prorty orderng polces are optmal 2 for tasks wth arbtrary deadlnes. We reproduce here the optmal prorty orderng algorthm of Audsley [1]. he algorthm works as follows: a prorty orderng s partton nto two parts: a sorted part, consstng of the lower n prorty tasks, and the remanng unsorted hgher prorty tasks. Intally the prorty orderng s an arbtrary one, and all tasks are unsorted. All tasks n the unsorted partton are chosen n turn and placed at the top of the sorted partton and tested for schedulablty. If the chosen task s schedulable then the prorty of the task s left as t s, and the sorted partton extended by one poston. If the task s not schedulable t s returned to ts former prorty. hs contnues untl ether all tasks n the unsorted partton have been checked and found to be unschedulable (n whch case there s no prorty orderng resultng n a schedulable system), or else the sorted partton s extended to the whole prorty map (n whch case the prorty orderng s a feasble one). An arbtrary prorty orderng s chosen n an array, wth 0 beng the hghest prorty, and N 1 the lowest (N denotes the number of tasks n the system; the algorthm assumes N > 1). he followng pseudo-code detals the algorthm: ordered := N repeat fnshed := false faled := true := 1 repeat nsert at prorty ordered f s schedulable then ordered := ordered - 1 faled := false fnshed := true else nsert back at old prorty end f := + 1 untl fnshed or = ordered untl Ordered = 1 or faled 2 optmal n the sense that f the algorthm s unable to fnd a prorty orderng where all tasks are schedulable then no prorty orderng exsts where all tasks are schedulable 11

12 # %$ " "" & At all tmes the sorted partton s schedulable, snce the prorty orderng wthn the unsorted partton cannot affect the sorted tasks. he sorted partton ncreases n sze untl ether all the tasks are schedulable, or none of the top n tasks are schedulable at prorty n. he analyss has the property that decreasng the prorty of a task cannot lead to a decrease n worst-case response tme (.e. a decrease n prorty cannot ncrease schedulablty). herefore, n the case where none of the top n tasks s schedulable at prorty n no prorty orderng can exst where all tasks are schedulable. herefore the algorthm must be consdered optmal. Furthermore, ths algorthm holds for any schedulng test where worst-case response tme s monotonc wth decreasng prorty (.e. where decreasng the prorty of a task does not lead to a decrease n the worst-case response tme of that task). 8. SUMMARY We reproduce here the equatons for the full schedulablty test: he worst-case response tme of a task s gven by: r = max w ( q ) + J mt M q= 0, 1, 2, 3,... he teraton over values of q can stop as soon as w (q) M + m t J M s gven by: M q = n and m s gven by: m = q Mn w (q) s gven by: w ( q) = M n + m + 1 C + B + mn n, hp( ) + LC + mn L, K C + max( K L, 0) C clk QL QS J + w ( q) F t + F n C where w (q) can be found by teraton as for equaton 1, wth w (q) 0 = w (q 1), and w (0) 0 = 0 F s gven by: F = J + w ( q) K s gven by: K = mn tasks! J + w ( q) F, n t '( + n F and L s gven by: 12

13 w q L = ( ) clk Other symbols used n the above equatons are defned n the glossary gven n Appendx A. he schedulablty of a task can be assessed by comparng wth the deadlne: r D An optmal prorty orderng can be obtaned usng the algorthm descrbed n the prevous secton. 9. EXAMPLE ASK SE he followng tables summarse an example task set, based upon the GAP task set descrbed by Locke et al [13]. he tasks are lsted n prorty order, as found by the optmal prorty orderng algorthm descrbed earler. All tmes are n mcroseconds. ask 11 s a sporadc task, whose arrval s polled for by the tck scheduler, and therefore has non-zero release tter. All other tasks are strctly perodc, wth perods that are multples of clk, and hence do not suffer release tter. asks lock and unlock semaphores accordng to the followng pattern: semaphore locked by tme held 2 task task task task task task task task task When the task set s assgned a deadlne monotonc prorty orderng, the worst-case response tmes are as follows: ID t n C B J D r task task task task task task task task task task task task task task task task task

14 asks are lsted n the table n prorty order. As can be seen, task 10 msses ts deadlne (the worst-case response tme of ths task s marked n bold type). When Audsley s optmal prorty orderng algorthm s appled, and the analyss gven n ths paper used, the followng results are obtaned: ID B r task task task task task task task task task task task task task task task task task Agan, tasks are lsted n the table n prorty order. As can be seen, the worst-case response tmes of all tasks are less than the deadlnes, and hence the task set s schedulable. Appendx B detals how to obtan the program that mplemented the analyss gven n ths paper. 10. CONCLUSIONS hs short paper has shown how the wndow approach to fndng worst-case response tmes can gve powerful schedulng theory talored to the behavour of real real-tme systems. o use the wndow approach, all that need be done s to fnd the worst-case amount of hgher prorty computaton startng n a gven wndow, and examne a suffcent number of wndows. hs approach has led to schedulablty analyss for complex task behavour, such as mode changes [7] and task offsets [6]; the latter analyss has been shown to be a superset of statc prorty cyclc schedulng. he overheads due to operatng a tck drven scheduler have also been accurately accounted for. he analyss derved n ths paper permts tasks to be assgned arbtrary deadlnes, suffer release tter, and behave as sporadcally perodc tasks. 11. REFERENCES [1] Audsley, N. C., Optmal Prorty Assgnment and Feasblty of Statc Prorty asks Wth Arbtrary Start mes, Dept. Computer Scence, Unversty of York (December 1991). [2] Audsley, N., A. Burns, M. Rchardson, K. ndell and A. Wellngs, Applyng New Schedulng heory to Statc Prorty Pre-emptve Schedulng, Report RRG/92/120 Department of Computer Scence, Unversty of York (February 1992). [3] Baker,. P., Stack-Based Schedulng of Realtme Processes, Real me Systems 3(1) (March 1991). [4] A.D. Hutcheon, mngs of Run-tme Operatons n Modfed York Ada, ask 8 Volume C, Delverable on ESEC Contract 9198/90/NL/SF, York Software Engneerng Lmted, Unversty of York (July 1992). [5] Joseph, M., P. Pandya, Fndng Response mes n a Real-me System, BCS Computer Journal (Vol. 29, No. 5, Oct 86) pp [6] K. ndell, Usng Offset Informaton to Analyse Statc Prorty Pre-Emptvely Scheduled ask Sets, YCS 182, Dept of Computer Scence, Unversty of York (August 1992d). 14

15 [7] K. W. ndell, A. Burns and A. J. Wellngs, Mode Changes n Prorty Pre-emptvely Scheduled Systems, Proceedngs 13th IEEE Real-me Systems Symposum (2-4 December 1992). [8] Lehoczky, J. P., Fxed Prorty Schedulng of Perodc ask Sets Wth Arbtrary Deadlnes, Proceedngs 11th IEEE Real-me Systems Symposum (5-7 Decmeber 1990) pp [9] Lehoczky, J., L. Sha and Y. Dng, he Rate Monotonc Schedulng Algorthm: Exact Charactersaton and Average Case Behavour, Proceedngs of the Real-me Systems Symposum (1989). [10] Leung, J. Y.., J. Whtehead, On he Complexty of Fxed-Prorty Schedulng of Perodc Real-me asks, Performance Evaluaton (Vol. 2, Part 4, Dec 1982) pp [11] Lu, C. L., J. W. Layland, Schedulng Algorthms for Multprogrammng n a Hard-Real-me Envronment, Journal of the ACM 20(1) (1973) pp [12] Locke, C.D., Software archtecture for hard real-tme applcatons: cyclc executves vs. fxed prorty executves, Real-me Systems 4(1) (March 1992) pp Real-me Syst. (Netherlands). [13] Locke, C. D., D. R. Vogel and. J. Mesler, Buldng a Predctable Avoncs Platform n Ada: A Case Study, Proceedngs of the 12th Real me Systems Symposum (December 1991). [14] Rakumar, R., L. Sha and J. P. Lehoczky, Real-me Synchronzaton Protocols for Multprocessors, Proceedngs of the IEEE Real-me Systems Symposum (1988) pp [15] Sha, L., R. Rakumar and J. P. Lehoczky, Prorty Inhertance Protocols: An Approach to Real-me Synchronsaton, IEEE ransactons on Computers 39(9) (September 1990) pp [16] ndell, K., Usng Offset Informaton to Analyse Statc Prorty Pre-Emptvely Scheduled ask Sets, Dept of Computer Scence, Unversty of York (August 1992). [17] ndell, K., A. Burns and A.J. Wellngs, Allocatng Real-me asks (An NP-Hard Problem made Easy), Real-me Systems 4(2) (June 1992) pp APPENDIX A GLOSSARY OF NOAION he followng table gves the notaton used n ths paper: tasks hp() C D B J t n r C QL C QS clk C clk w ask denotes the task for whch we are tryng to fnd the worst-case response tme ask generally denotes a task of hgher prorty than he set of all tasks n the system he set of all tasks of hgher prorty than task he worst-case computaton tme of task he statc deadlne of task, measured relatve to the arrval tme of the task he worst-case blockng tme of task, found accordng to the prorty celng protocol he worst-case release tter of task (.e. the worst-case delay between a task arrvng and beng released) he outer perod of task he nner perod of task he worst-case number of arrvals of task per outer perod he worst-case response tme of task, measured from the arrval tme to the completon tme he worst-case computaton tme requred to move a sngle task from the delay queue to the run queue he worst-case computaton tme to move each task from the delay queue to the run queue he perod of the clock tmer nterrupt he worst-case computaton tme requred to servce the perodc clock tmer nterrupt Generally a computaton wndow used to fnd worst-case response tmes 15

16 APPENDIX B AN ANALYSIS PROGRAM he source code to a program that mplements the analyss descrbed n ths paper can be obtaned va anonymous FP from: mnster.york.ac.uk (IP address: ) n the drectory: pub/realtme/programs/src/arbdead 16

Real-Time Systems. Multiprocessor scheduling. Multiprocessor scheduling. Multiprocessor scheduling

Real-Time Systems. Multiprocessor scheduling. Multiprocessor scheduling. Multiprocessor scheduling Real-Tme Systems Multprocessor schedulng Specfcaton Implementaton Verfcaton Multprocessor schedulng -- -- Global schedulng How are tasks assgned to processors? Statc assgnment The processor(s) used for

More information

Embedded Systems. 4. Aperiodic and Periodic Tasks

Embedded Systems. 4. Aperiodic and Periodic Tasks Embedded Systems 4. Aperodc and Perodc Tasks Lothar Thele 4-1 Contents of Course 1. Embedded Systems Introducton 2. Software Introducton 7. System Components 10. Models 3. Real-Tme Models 4. Perodc/Aperodc

More information

Last Time. Priority-based scheduling. Schedulable utilization Rate monotonic rule: Keep utilization below 69% Static priorities Dynamic priorities

Last Time. Priority-based scheduling. Schedulable utilization Rate monotonic rule: Keep utilization below 69% Static priorities Dynamic priorities Last Tme Prorty-based schedulng Statc prortes Dynamc prortes Schedulable utlzaton Rate monotonc rule: Keep utlzaton below 69% Today Response tme analyss Blockng terms Prorty nverson And solutons Release

More information

Module 9. Lecture 6. Duality in Assignment Problems

Module 9. Lecture 6. Duality in Assignment Problems Module 9 1 Lecture 6 Dualty n Assgnment Problems In ths lecture we attempt to answer few other mportant questons posed n earler lecture for (AP) and see how some of them can be explaned through the concept

More information

Quantifying the Sub-optimality of Uniprocessor Fixed Priority Pre-emptive Scheduling for Sporadic Tasksets with Arbitrary Deadlines

Quantifying the Sub-optimality of Uniprocessor Fixed Priority Pre-emptive Scheduling for Sporadic Tasksets with Arbitrary Deadlines Quantfyng the Sub-optmalty of Unprocessor Fxed Prorty Pre-emptve Schedulng for Sporadc Tasksets wth Arbtrary Deadlnes Robert Davs, Sanjoy Baruah, Thomas Rothvoss, Alan Burns To cte ths verson: Robert Davs,

More information

Two Methods to Release a New Real-time Task

Two Methods to Release a New Real-time Task Two Methods to Release a New Real-tme Task Abstract Guangmng Qan 1, Xanghua Chen 2 College of Mathematcs and Computer Scence Hunan Normal Unversty Changsha, 410081, Chna qqyy@hunnu.edu.cn Gang Yao 3 Sebel

More information

Improved Worst-Case Response-Time Calculations by Upper-Bound Conditions

Improved Worst-Case Response-Time Calculations by Upper-Bound Conditions Improved Worst-Case Response-Tme Calculatons by Upper-Bound Condtons Vctor Pollex, Steffen Kollmann, Karsten Albers and Frank Slomka Ulm Unversty Insttute of Embedded Systems/Real-Tme Systems {frstname.lastname}@un-ulm.de

More information

Scheduling Motivation

Scheduling Motivation 76 eal-me & Embedded Systems 7 Uwe. Zmmer - he Australan Natonal Unversty 78 Motvaton n eal-me Systems Concurrency may lead to non-determnsm. Non-determnsm may make t harder to predct the tmng behavour.

More information

Computer Control: Task Synchronisation in Dynamic Priority Scheduling

Computer Control: Task Synchronisation in Dynamic Priority Scheduling Computer Control: Task Synchronsaton n Dynamc Prorty Schedulng Sérgo Adrano Fernandes Lopes Department of Industral Electroncs Engneerng School Unversty of Mnho Campus de Azurém 4800 Gumarães - PORTUGAL

More information

Problem Set 9 Solutions

Problem Set 9 Solutions Desgn and Analyss of Algorthms May 4, 2015 Massachusetts Insttute of Technology 6.046J/18.410J Profs. Erk Demane, Srn Devadas, and Nancy Lynch Problem Set 9 Solutons Problem Set 9 Solutons Ths problem

More information

Clock-Driven Scheduling (in-depth) Cyclic Schedules: General Structure

Clock-Driven Scheduling (in-depth) Cyclic Schedules: General Structure CPSC-663: Real-me Systems n-depth Precompute statc schedule o-lne e.g. at desgn tme: can aord expensve algorthms. Idle tmes can be used or aperodc jobs. Possble mplementaton: able-drven Schedulng table

More information

Quantifying the Sub-optimality of Uniprocessor Fixed Priority Non-Pre-emptive Scheduling

Quantifying the Sub-optimality of Uniprocessor Fixed Priority Non-Pre-emptive Scheduling Quantfyng the Sub-optmalty of Unprocessor Fxed Prorty Non-Pre-emptve Schedulng Robert I Davs Real-Tme Systems Research Group, Department of Computer Scence, Unversty of York, York, UK robdavs@csyorkacuk

More information

The optimal delay of the second test is therefore approximately 210 hours earlier than =2.

The optimal delay of the second test is therefore approximately 210 hours earlier than =2. THE IEC 61508 FORMULAS 223 The optmal delay of the second test s therefore approxmately 210 hours earler than =2. 8.4 The IEC 61508 Formulas IEC 61508-6 provdes approxmaton formulas for the PF for smple

More information

Keynote: RTNS Getting ones priorities right

Keynote: RTNS Getting ones priorities right Keynote: RTNS 2012 Gettng ones prortes rght Robert Davs Real-Tme Systems Research Group, Unversty of York rob.davs@york.ac.uk What s ths talk about? Fxed Prorty schedulng n all ts guses Pre-emptve, non-pre-emptve,

More information

Outline. Communication. Bellman Ford Algorithm. Bellman Ford Example. Bellman Ford Shortest Path [1]

Outline. Communication. Bellman Ford Algorithm. Bellman Ford Example. Bellman Ford Shortest Path [1] DYNAMIC SHORTEST PATH SEARCH AND SYNCHRONIZED TASK SWITCHING Jay Wagenpfel, Adran Trachte 2 Outlne Shortest Communcaton Path Searchng Bellmann Ford algorthm Algorthm for dynamc case Modfcatons to our algorthm

More information

Improving the Sensitivity of Deadlines with a Specific Asynchronous Scenario for Harmonic Periodic Tasks scheduled by FP

Improving the Sensitivity of Deadlines with a Specific Asynchronous Scenario for Harmonic Periodic Tasks scheduled by FP Improvng the Senstvty of Deadlnes wth a Specfc Asynchronous Scenaro for Harmonc Perodc Tasks scheduled by FP P. Meumeu Yoms, Y. Sorel, D. de Rauglaudre AOSTE Project-team INRIA Pars-Rocquencourt Le Chesnay,

More information

EEL 6266 Power System Operation and Control. Chapter 3 Economic Dispatch Using Dynamic Programming

EEL 6266 Power System Operation and Control. Chapter 3 Economic Dispatch Using Dynamic Programming EEL 6266 Power System Operaton and Control Chapter 3 Economc Dspatch Usng Dynamc Programmng Pecewse Lnear Cost Functons Common practce many utltes prefer to represent ther generator cost functons as sngle-

More information

College of Computer & Information Science Fall 2009 Northeastern University 20 October 2009

College of Computer & Information Science Fall 2009 Northeastern University 20 October 2009 College of Computer & Informaton Scence Fall 2009 Northeastern Unversty 20 October 2009 CS7880: Algorthmc Power Tools Scrbe: Jan Wen and Laura Poplawsk Lecture Outlne: Prmal-dual schema Network Desgn:

More information

Worst-case response time analysis of real-time tasks under fixed-priority scheduling with deferred preemption

Worst-case response time analysis of real-time tasks under fixed-priority scheduling with deferred preemption Real-Tme Syst (2009) 42: 63 119 DOI 10.1007/s11241-009-9071-z Worst-case response tme analyss of real-tme tasks under fxed-prorty schedulng wth deferred preempton Render J. Brl Johan J. Lukken Wm F.J.

More information

MMA and GCMMA two methods for nonlinear optimization

MMA and GCMMA two methods for nonlinear optimization MMA and GCMMA two methods for nonlnear optmzaton Krster Svanberg Optmzaton and Systems Theory, KTH, Stockholm, Sweden. krlle@math.kth.se Ths note descrbes the algorthms used n the author s 2007 mplementatons

More information

Structure and Drive Paul A. Jensen Copyright July 20, 2003

Structure and Drive Paul A. Jensen Copyright July 20, 2003 Structure and Drve Paul A. Jensen Copyrght July 20, 2003 A system s made up of several operatons wth flow passng between them. The structure of the system descrbes the flow paths from nputs to outputs.

More information

Limited Preemptive Scheduling for Real-Time Systems: a Survey

Limited Preemptive Scheduling for Real-Time Systems: a Survey Lmted Preemptve Schedulng for Real-Tme Systems: a Survey Gorgo C. Buttazzo, Fellow Member, IEEE, Marko Bertogna, Senor Member, IEEE, and Gang Yao Abstract The queston whether preemptve algorthms are better

More information

Appendix B: Resampling Algorithms

Appendix B: Resampling Algorithms 407 Appendx B: Resamplng Algorthms A common problem of all partcle flters s the degeneracy of weghts, whch conssts of the unbounded ncrease of the varance of the mportance weghts ω [ ] of the partcles

More information

Resource Allocation with a Budget Constraint for Computing Independent Tasks in the Cloud

Resource Allocation with a Budget Constraint for Computing Independent Tasks in the Cloud Resource Allocaton wth a Budget Constrant for Computng Independent Tasks n the Cloud Wemng Sh and Bo Hong School of Electrcal and Computer Engneerng Georga Insttute of Technology, USA 2nd IEEE Internatonal

More information

Fixed-Priority Multiprocessor Scheduling with Liu & Layland s Utilization Bound

Fixed-Priority Multiprocessor Scheduling with Liu & Layland s Utilization Bound Fxed-Prorty Multprocessor Schedulng wth Lu & Layland s Utlzaton Bound Nan Guan, Martn Stgge, Wang Y and Ge Yu Department of Informaton Technology, Uppsala Unversty, Sweden Department of Computer Scence

More information

Resource Sharing. CSCE 990: Real-Time Systems. Steve Goddard. Resources & Resource Access Control (Chapter 8 of Liu)

Resource Sharing. CSCE 990: Real-Time Systems. Steve Goddard. Resources & Resource Access Control (Chapter 8 of Liu) CSCE 990: Real-Tme Systems Resource Sharng Steve Goddard goddard@cse.unl.edu http://www.cse.unl.edu/~goddard/courses/realtmesystems Resources & Resource Access Control (Chapter 8 of Lu) Real-Tme Systems

More information

NP-Completeness : Proofs

NP-Completeness : Proofs NP-Completeness : Proofs Proof Methods A method to show a decson problem Π NP-complete s as follows. (1) Show Π NP. (2) Choose an NP-complete problem Π. (3) Show Π Π. A method to show an optmzaton problem

More information

Simultaneous Optimization of Berth Allocation, Quay Crane Assignment and Quay Crane Scheduling Problems in Container Terminals

Simultaneous Optimization of Berth Allocation, Quay Crane Assignment and Quay Crane Scheduling Problems in Container Terminals Smultaneous Optmzaton of Berth Allocaton, Quay Crane Assgnment and Quay Crane Schedulng Problems n Contaner Termnals Necat Aras, Yavuz Türkoğulları, Z. Caner Taşkın, Kuban Altınel Abstract In ths work,

More information

More metrics on cartesian products

More metrics on cartesian products More metrcs on cartesan products If (X, d ) are metrc spaces for 1 n, then n Secton II4 of the lecture notes we defned three metrcs on X whose underlyng topologes are the product topology The purpose of

More information

Graph Reconstruction by Permutations

Graph Reconstruction by Permutations Graph Reconstructon by Permutatons Perre Ille and Wllam Kocay* Insttut de Mathémathques de Lumny CNRS UMR 6206 163 avenue de Lumny, Case 907 13288 Marselle Cedex 9, France e-mal: lle@ml.unv-mrs.fr Computer

More information

Difference Equations

Difference Equations Dfference Equatons c Jan Vrbk 1 Bascs Suppose a sequence of numbers, say a 0,a 1,a,a 3,... s defned by a certan general relatonshp between, say, three consecutve values of the sequence, e.g. a + +3a +1

More information

Foundations of Arithmetic

Foundations of Arithmetic Foundatons of Arthmetc Notaton We shall denote the sum and product of numbers n the usual notaton as a 2 + a 2 + a 3 + + a = a, a 1 a 2 a 3 a = a The notaton a b means a dvdes b,.e. ac = b where c s an

More information

U.C. Berkeley CS294: Spectral Methods and Expanders Handout 8 Luca Trevisan February 17, 2016

U.C. Berkeley CS294: Spectral Methods and Expanders Handout 8 Luca Trevisan February 17, 2016 U.C. Berkeley CS94: Spectral Methods and Expanders Handout 8 Luca Trevsan February 7, 06 Lecture 8: Spectral Algorthms Wrap-up In whch we talk about even more generalzatons of Cheeger s nequaltes, and

More information

Single-Facility Scheduling over Long Time Horizons by Logic-based Benders Decomposition

Single-Facility Scheduling over Long Time Horizons by Logic-based Benders Decomposition Sngle-Faclty Schedulng over Long Tme Horzons by Logc-based Benders Decomposton Elvn Coban and J. N. Hooker Tepper School of Busness, Carnege Mellon Unversty ecoban@andrew.cmu.edu, john@hooker.tepper.cmu.edu

More information

Fixed-Priority Multiprocessor Scheduling with Liu & Layland s Utilization Bound

Fixed-Priority Multiprocessor Scheduling with Liu & Layland s Utilization Bound Fxed-Prorty Multprocessor Schedulng wth Lu & Layland s Utlzaton Bound Nan Guan, Martn Stgge, Wang Y and Ge Yu Department of Informaton Technology, Uppsala Unversty, Sweden Department of Computer Scence

More information

Common loop optimizations. Example to improve locality. Why Dependence Analysis. Data Dependence in Loops. Goal is to find best schedule:

Common loop optimizations. Example to improve locality. Why Dependence Analysis. Data Dependence in Loops. Goal is to find best schedule: 15-745 Lecture 6 Data Dependence n Loops Copyrght Seth Goldsten, 2008 Based on sldes from Allen&Kennedy Lecture 6 15-745 2005-8 1 Common loop optmzatons Hostng of loop-nvarant computatons pre-compute before

More information

Lecture 4: November 17, Part 1 Single Buffer Management

Lecture 4: November 17, Part 1 Single Buffer Management Lecturer: Ad Rosén Algorthms for the anagement of Networs Fall 2003-2004 Lecture 4: November 7, 2003 Scrbe: Guy Grebla Part Sngle Buffer anagement In the prevous lecture we taled about the Combned Input

More information

5 The Rational Canonical Form

5 The Rational Canonical Form 5 The Ratonal Canoncal Form Here p s a monc rreducble factor of the mnmum polynomal m T and s not necessarly of degree one Let F p denote the feld constructed earler n the course, consstng of all matrces

More information

Real-Time Operating Systems M. 11. Real-Time: Periodic Task Scheduling

Real-Time Operating Systems M. 11. Real-Time: Periodic Task Scheduling Real-Tme Operatng Systems M 11. Real-Tme: Perodc Task Schedulng Notce The course materal ncludes sldes downloaded from:! http://codex.cs.yale.edu/av/os-book/! and! (sldes by Slberschatz, Galvn, and Gagne,

More information

CHAPTER 17 Amortized Analysis

CHAPTER 17 Amortized Analysis CHAPTER 7 Amortzed Analyss In an amortzed analyss, the tme requred to perform a sequence of data structure operatons s averaged over all the operatons performed. It can be used to show that the average

More information

Chapter Newton s Method

Chapter Newton s Method Chapter 9. Newton s Method After readng ths chapter, you should be able to:. Understand how Newton s method s dfferent from the Golden Secton Search method. Understand how Newton s method works 3. Solve

More information

ELASTIC WAVE PROPAGATION IN A CONTINUOUS MEDIUM

ELASTIC WAVE PROPAGATION IN A CONTINUOUS MEDIUM ELASTIC WAVE PROPAGATION IN A CONTINUOUS MEDIUM An elastc wave s a deformaton of the body that travels throughout the body n all drectons. We can examne the deformaton over a perod of tme by fxng our look

More information

THE SUMMATION NOTATION Ʃ

THE SUMMATION NOTATION Ʃ Sngle Subscrpt otaton THE SUMMATIO OTATIO Ʃ Most of the calculatons we perform n statstcs are repettve operatons on lsts of numbers. For example, we compute the sum of a set of numbers, or the sum of the

More information

Chapter - 2. Distribution System Power Flow Analysis

Chapter - 2. Distribution System Power Flow Analysis Chapter - 2 Dstrbuton System Power Flow Analyss CHAPTER - 2 Radal Dstrbuton System Load Flow 2.1 Introducton Load flow s an mportant tool [66] for analyzng electrcal power system network performance. Load

More information

Global EDF Scheduling for Parallel Real-Time Tasks

Global EDF Scheduling for Parallel Real-Time Tasks Washngton Unversty n St. Lous Washngton Unversty Open Scholarshp Engneerng and Appled Scence Theses & Dssertatons Engneerng and Appled Scence Sprng 5-15-2014 Global EDF Schedulng for Parallel Real-Tme

More information

2E Pattern Recognition Solutions to Introduction to Pattern Recognition, Chapter 2: Bayesian pattern classification

2E Pattern Recognition Solutions to Introduction to Pattern Recognition, Chapter 2: Bayesian pattern classification E395 - Pattern Recognton Solutons to Introducton to Pattern Recognton, Chapter : Bayesan pattern classfcaton Preface Ths document s a soluton manual for selected exercses from Introducton to Pattern Recognton

More information

Turing Machines (intro)

Turing Machines (intro) CHAPTER 3 The Church-Turng Thess Contents Turng Machnes defntons, examples, Turng-recognzable and Turng-decdable languages Varants of Turng Machne Multtape Turng machnes, non-determnstc Turng Machnes,

More information

Equilibrium Analysis of the M/G/1 Queue

Equilibrium Analysis of the M/G/1 Queue Eulbrum nalyss of the M/G/ Queue Copyrght, Sanay K. ose. Mean nalyss usng Resdual Lfe rguments Secton 3.. nalyss usng an Imbedded Marov Chan pproach Secton 3. 3. Method of Supplementary Varables done later!

More information

A Simple Inventory System

A Simple Inventory System A Smple Inventory System Lawrence M. Leems and Stephen K. Park, Dscrete-Event Smulaton: A Frst Course, Prentce Hall, 2006 Hu Chen Computer Scence Vrgna State Unversty Petersburg, Vrgna February 8, 2017

More information

Grover s Algorithm + Quantum Zeno Effect + Vaidman

Grover s Algorithm + Quantum Zeno Effect + Vaidman Grover s Algorthm + Quantum Zeno Effect + Vadman CS 294-2 Bomb 10/12/04 Fall 2004 Lecture 11 Grover s algorthm Recall that Grover s algorthm for searchng over a space of sze wors as follows: consder the

More information

Lecture Notes on Linear Regression

Lecture Notes on Linear Regression Lecture Notes on Lnear Regresson Feng L fl@sdueducn Shandong Unversty, Chna Lnear Regresson Problem In regresson problem, we am at predct a contnuous target value gven an nput feature vector We assume

More information

Lecture 12: Discrete Laplacian

Lecture 12: Discrete Laplacian Lecture 12: Dscrete Laplacan Scrbe: Tanye Lu Our goal s to come up wth a dscrete verson of Laplacan operator for trangulated surfaces, so that we can use t n practce to solve related problems We are mostly

More information

Analysis of Discrete Time Queues (Section 4.6)

Analysis of Discrete Time Queues (Section 4.6) Analyss of Dscrete Tme Queues (Secton 4.6) Copyrght 2002, Sanjay K. Bose Tme axs dvded nto slots slot slot boundares Arrvals can only occur at slot boundares Servce to a job can only start at a slot boundary

More information

The Order Relation and Trace Inequalities for. Hermitian Operators

The Order Relation and Trace Inequalities for. Hermitian Operators Internatonal Mathematcal Forum, Vol 3, 08, no, 507-57 HIKARI Ltd, wwwm-hkarcom https://doorg/0988/mf088055 The Order Relaton and Trace Inequaltes for Hermtan Operators Y Huang School of Informaton Scence

More information

ECE559VV Project Report

ECE559VV Project Report ECE559VV Project Report (Supplementary Notes Loc Xuan Bu I. MAX SUM-RATE SCHEDULING: THE UPLINK CASE We have seen (n the presentaton that, for downlnk (broadcast channels, the strategy maxmzng the sum-rate

More information

EDF Scheduling for Identical Multiprocessor Systems

EDF Scheduling for Identical Multiprocessor Systems EDF Schedulng for dentcal Multprocessor Systems Maro Bertogna Unversty of Modena, taly As Moore s law goes on Number of transstor/chp doubles every 18 to 24 mm heatng becomes a problem Power densty (W/cm

More information

Finding Primitive Roots Pseudo-Deterministically

Finding Primitive Roots Pseudo-Deterministically Electronc Colloquum on Computatonal Complexty, Report No 207 (205) Fndng Prmtve Roots Pseudo-Determnstcally Ofer Grossman December 22, 205 Abstract Pseudo-determnstc algorthms are randomzed search algorthms

More information

The Minimum Universal Cost Flow in an Infeasible Flow Network

The Minimum Universal Cost Flow in an Infeasible Flow Network Journal of Scences, Islamc Republc of Iran 17(2): 175-180 (2006) Unversty of Tehran, ISSN 1016-1104 http://jscencesutacr The Mnmum Unversal Cost Flow n an Infeasble Flow Network H Saleh Fathabad * M Bagheran

More information

Case A. P k = Ni ( 2L i k 1 ) + (# big cells) 10d 2 P k.

Case A. P k = Ni ( 2L i k 1 ) + (# big cells) 10d 2 P k. THE CELLULAR METHOD In ths lecture, we ntroduce the cellular method as an approach to ncdence geometry theorems lke the Szemeréd-Trotter theorem. The method was ntroduced n the paper Combnatoral complexty

More information

Chapter 5. Solution of System of Linear Equations. Module No. 6. Solution of Inconsistent and Ill Conditioned Systems

Chapter 5. Solution of System of Linear Equations. Module No. 6. Solution of Inconsistent and Ill Conditioned Systems Numercal Analyss by Dr. Anta Pal Assstant Professor Department of Mathematcs Natonal Insttute of Technology Durgapur Durgapur-713209 emal: anta.bue@gmal.com 1 . Chapter 5 Soluton of System of Lnear Equatons

More information

= z 20 z n. (k 20) + 4 z k = 4

= z 20 z n. (k 20) + 4 z k = 4 Problem Set #7 solutons 7.2.. (a Fnd the coeffcent of z k n (z + z 5 + z 6 + z 7 + 5, k 20. We use the known seres expanson ( n+l ( z l l z n below: (z + z 5 + z 6 + z 7 + 5 (z 5 ( + z + z 2 + z + 5 5

More information

CONTRAST ENHANCEMENT FOR MIMIMUM MEAN BRIGHTNESS ERROR FROM HISTOGRAM PARTITIONING INTRODUCTION

CONTRAST ENHANCEMENT FOR MIMIMUM MEAN BRIGHTNESS ERROR FROM HISTOGRAM PARTITIONING INTRODUCTION CONTRAST ENHANCEMENT FOR MIMIMUM MEAN BRIGHTNESS ERROR FROM HISTOGRAM PARTITIONING N. Phanthuna 1,2, F. Cheevasuvt 2 and S. Chtwong 2 1 Department of Electrcal Engneerng, Faculty of Engneerng Rajamangala

More information

Suggested solutions for the exam in SF2863 Systems Engineering. June 12,

Suggested solutions for the exam in SF2863 Systems Engineering. June 12, Suggested solutons for the exam n SF2863 Systems Engneerng. June 12, 2012 14.00 19.00 Examner: Per Enqvst, phone: 790 62 98 1. We can thnk of the farm as a Jackson network. The strawberry feld s modelled

More information

3.1 Expectation of Functions of Several Random Variables. )' be a k-dimensional discrete or continuous random vector, with joint PMF p (, E X E X1 E X

3.1 Expectation of Functions of Several Random Variables. )' be a k-dimensional discrete or continuous random vector, with joint PMF p (, E X E X1 E X Statstcs 1: Probablty Theory II 37 3 EPECTATION OF SEVERAL RANDOM VARIABLES As n Probablty Theory I, the nterest n most stuatons les not on the actual dstrbuton of a random vector, but rather on a number

More information

Economics 101. Lecture 4 - Equilibrium and Efficiency

Economics 101. Lecture 4 - Equilibrium and Efficiency Economcs 0 Lecture 4 - Equlbrum and Effcency Intro As dscussed n the prevous lecture, we wll now move from an envronment where we looed at consumers mang decsons n solaton to analyzng economes full of

More information

Section 8.3 Polar Form of Complex Numbers

Section 8.3 Polar Form of Complex Numbers 80 Chapter 8 Secton 8 Polar Form of Complex Numbers From prevous classes, you may have encountered magnary numbers the square roots of negatve numbers and, more generally, complex numbers whch are the

More information

Inner Product. Euclidean Space. Orthonormal Basis. Orthogonal

Inner Product. Euclidean Space. Orthonormal Basis. Orthogonal Inner Product Defnton 1 () A Eucldean space s a fnte-dmensonal vector space over the reals R, wth an nner product,. Defnton 2 (Inner Product) An nner product, on a real vector space X s a symmetrc, blnear,

More information

Assortment Optimization under MNL

Assortment Optimization under MNL Assortment Optmzaton under MNL Haotan Song Aprl 30, 2017 1 Introducton The assortment optmzaton problem ams to fnd the revenue-maxmzng assortment of products to offer when the prces of products are fxed.

More information

CS 770G - Parallel Algorithms in Scientific Computing

CS 770G - Parallel Algorithms in Scientific Computing References CS 770G - Parallel Algorthms n Scentfc Computng Parallel Sortng Introducton to Parallel Computng Kumar, Grama, Gupta, Karyps, Benjamn Cummngs. A porton of the notes comes from Prof. J. Demmel

More information

Lecture 14: Bandits with Budget Constraints

Lecture 14: Bandits with Budget Constraints IEOR 8100-001: Learnng and Optmzaton for Sequental Decson Makng 03/07/16 Lecture 14: andts wth udget Constrants Instructor: Shpra Agrawal Scrbed by: Zhpeng Lu 1 Problem defnton In the regular Mult-armed

More information

The Study of Teaching-learning-based Optimization Algorithm

The Study of Teaching-learning-based Optimization Algorithm Advanced Scence and Technology Letters Vol. (AST 06), pp.05- http://dx.do.org/0.57/astl.06. The Study of Teachng-learnng-based Optmzaton Algorthm u Sun, Yan fu, Lele Kong, Haolang Q,, Helongang Insttute

More information

Lecture 8: Time & Clocks. CDK: Sections TVS: Sections

Lecture 8: Time & Clocks. CDK: Sections TVS: Sections Lecture 8: Tme & Clocks CDK: Sectons 11.1 11.4 TVS: Sectons 6.1 6.2 Topcs Synchronzaton Logcal tme (Lamport) Vector clocks We assume there are benefts from havng dfferent systems n a network able to agree

More information

Remarks on the Properties of a Quasi-Fibonacci-like Polynomial Sequence

Remarks on the Properties of a Quasi-Fibonacci-like Polynomial Sequence Remarks on the Propertes of a Quas-Fbonacc-lke Polynomal Sequence Brce Merwne LIU Brooklyn Ilan Wenschelbaum Wesleyan Unversty Abstract Consder the Quas-Fbonacc-lke Polynomal Sequence gven by F 0 = 1,

More information

Improving the Quality of Control of Periodic Tasks Scheduled by FP with an Asynchronous Approach

Improving the Quality of Control of Periodic Tasks Scheduled by FP with an Asynchronous Approach Improvng the Qualty of Control of Perodc Tasks Scheduled by FP wth an Asynchronous Approach P. Meumeu Yoms, L. George, Y. Sorel, D. de Rauglaudre AOSTE Project-team INRIA Pars-Rocquencourt Le Chesnay,

More information

O-line Temporary Tasks Assignment. Abstract. In this paper we consider the temporary tasks assignment

O-line Temporary Tasks Assignment. Abstract. In this paper we consider the temporary tasks assignment O-lne Temporary Tasks Assgnment Yoss Azar and Oded Regev Dept. of Computer Scence, Tel-Avv Unversty, Tel-Avv, 69978, Israel. azar@math.tau.ac.l??? Dept. of Computer Scence, Tel-Avv Unversty, Tel-Avv, 69978,

More information

12. The Hamilton-Jacobi Equation Michael Fowler

12. The Hamilton-Jacobi Equation Michael Fowler 1. The Hamlton-Jacob Equaton Mchael Fowler Back to Confguraton Space We ve establshed that the acton, regarded as a functon of ts coordnate endponts and tme, satsfes ( ) ( ) S q, t / t+ H qpt,, = 0, and

More information

Critical sections. Using semaphores. Using semaphores. Using semaphores. How long is blocking time? 17/10/2016. Problems caused by mutual exclusion

Critical sections. Using semaphores. Using semaphores. Using semaphores. How long is blocking time? 17/10/2016. Problems caused by mutual exclusion rtcal sectons Problems caused by mutual excluson crtcal secton wat(s) x = ; y = 5; sgnal(s) wrte global memory buffer nt x; nt y; read wat(s) a = x+; b = y+; c = x+y; crtcal secton sgnal(s) Usng semaphores

More information

LINEAR REGRESSION ANALYSIS. MODULE IX Lecture Multicollinearity

LINEAR REGRESSION ANALYSIS. MODULE IX Lecture Multicollinearity LINEAR REGRESSION ANALYSIS MODULE IX Lecture - 30 Multcollnearty Dr. Shalabh Department of Mathematcs and Statstcs Indan Insttute of Technology Kanpur 2 Remedes for multcollnearty Varous technques have

More information

princeton univ. F 17 cos 521: Advanced Algorithm Design Lecture 7: LP Duality Lecturer: Matt Weinberg

princeton univ. F 17 cos 521: Advanced Algorithm Design Lecture 7: LP Duality Lecturer: Matt Weinberg prnceton unv. F 17 cos 521: Advanced Algorthm Desgn Lecture 7: LP Dualty Lecturer: Matt Wenberg Scrbe: LP Dualty s an extremely useful tool for analyzng structural propertes of lnear programs. Whle there

More information

Compilers. Spring term. Alfonso Ortega: Enrique Alfonseca: Chapter 4: Syntactic analysis

Compilers. Spring term. Alfonso Ortega: Enrique Alfonseca: Chapter 4: Syntactic analysis Complers Sprng term Alfonso Ortega: alfonso.ortega@uam.es nrque Alfonseca: enrque.alfonseca@uam.es Chapter : Syntactc analyss. Introducton. Bottom-up Analyss Syntax Analyser Concepts It analyses the context-ndependent

More information

DUE: WEDS FEB 21ST 2018

DUE: WEDS FEB 21ST 2018 HOMEWORK # 1: FINITE DIFFERENCES IN ONE DIMENSION DUE: WEDS FEB 21ST 2018 1. Theory Beam bendng s a classcal engneerng analyss. The tradtonal soluton technque makes smplfyng assumptons such as a constant

More information

A 2D Bounded Linear Program (H,c) 2D Linear Programming

A 2D Bounded Linear Program (H,c) 2D Linear Programming A 2D Bounded Lnear Program (H,c) h 3 v h 8 h 5 c h 4 h h 6 h 7 h 2 2D Lnear Programmng C s a polygonal regon, the ntersecton of n halfplanes. (H, c) s nfeasble, as C s empty. Feasble regon C s unbounded

More information

CONJUGACY IN THOMPSON S GROUP F. 1. Introduction

CONJUGACY IN THOMPSON S GROUP F. 1. Introduction CONJUGACY IN THOMPSON S GROUP F NICK GILL AND IAN SHORT Abstract. We complete the program begun by Brn and Squer of charactersng conjugacy n Thompson s group F usng the standard acton of F as a group of

More information

Tracking with Kalman Filter

Tracking with Kalman Filter Trackng wth Kalman Flter Scott T. Acton Vrgna Image and Vdeo Analyss (VIVA), Charles L. Brown Department of Electrcal and Computer Engneerng Department of Bomedcal Engneerng Unversty of Vrgna, Charlottesvlle,

More information

SINGLE EVENTS, TIME SERIES ANALYSIS, AND PLANETARY MOTION

SINGLE EVENTS, TIME SERIES ANALYSIS, AND PLANETARY MOTION SINGLE EVENTS, TIME SERIES ANALYSIS, AND PLANETARY MOTION John N. Harrs INTRODUCTION The advent of modern computng devces and ther applcaton to tme-seres analyses permts the nvestgaton of mathematcal and

More information

The lower and upper bounds on Perron root of nonnegative irreducible matrices

The lower and upper bounds on Perron root of nonnegative irreducible matrices Journal of Computatonal Appled Mathematcs 217 (2008) 259 267 wwwelsevercom/locate/cam The lower upper bounds on Perron root of nonnegatve rreducble matrces Guang-Xn Huang a,, Feng Yn b,keguo a a College

More information

Quantifying the Exact Sub-Optimality of Non-Preemptive Scheduling

Quantifying the Exact Sub-Optimality of Non-Preemptive Scheduling Quantfyng the Exact Sub-Optmalty of Non-Preemptve Schedulng Robert I. Davs 1, Abhlash Thekklakattl 2, Olver Gettngs 1, Radu Dobrn 2, and Saskumar Punnekkat 2 1 Real-Tme Systems Research Group, Unversty

More information

On the Interval Zoro Symmetric Single-step Procedure for Simultaneous Finding of Polynomial Zeros

On the Interval Zoro Symmetric Single-step Procedure for Simultaneous Finding of Polynomial Zeros Appled Mathematcal Scences, Vol. 5, 2011, no. 75, 3693-3706 On the Interval Zoro Symmetrc Sngle-step Procedure for Smultaneous Fndng of Polynomal Zeros S. F. M. Rusl, M. Mons, M. A. Hassan and W. J. Leong

More information

Mixed-Criticality Scheduling with I/O

Mixed-Criticality Scheduling with I/O Mxed-Crtcalty Schedulng wth I/O Erc Mssmer, Katherne Mssmer and Rchard West Computer Scence Department Boston Unversty Boston, USA Emal: mssmer,kzhao,rchwest}@cs.bu.edu Abstract Ths paper addresses the

More information

Parametric Utilization Bounds for Fixed-Priority Multiprocessor Scheduling

Parametric Utilization Bounds for Fixed-Priority Multiprocessor Scheduling 2012 IEEE 26th Internatonal Parallel and Dstrbuted Processng Symposum Parametrc Utlzaton Bounds for Fxed-Prorty Multprocessor Schedulng Nan Guan 1,2, Martn Stgge 1, Wang Y 1,2 and Ge Yu 2 1 Uppsala Unversty,

More information

Feature Selection: Part 1

Feature Selection: Part 1 CSE 546: Machne Learnng Lecture 5 Feature Selecton: Part 1 Instructor: Sham Kakade 1 Regresson n the hgh dmensonal settng How do we learn when the number of features d s greater than the sample sze n?

More information

Two-Phase Low-Energy N-Modular Redundancy for Hard Real-Time Multi-Core Systems

Two-Phase Low-Energy N-Modular Redundancy for Hard Real-Time Multi-Core Systems 1 Two-Phase Low-Energy N-Modular Redundancy for Hard Real-Tme Mult-Core Systems Mohammad Saleh, Alreza Ejlal, and Bashr M. Al-Hashm, Fellow, IEEE Abstract Ths paper proposes an N-modular redundancy (NMR)

More information

On the Repeating Group Finding Problem

On the Repeating Group Finding Problem The 9th Workshop on Combnatoral Mathematcs and Computaton Theory On the Repeatng Group Fndng Problem Bo-Ren Kung, Wen-Hsen Chen, R.C.T Lee Graduate Insttute of Informaton Technology and Management Takmng

More information

2.3 Nilpotent endomorphisms

2.3 Nilpotent endomorphisms s a block dagonal matrx, wth A Mat dm U (C) In fact, we can assume that B = B 1 B k, wth B an ordered bass of U, and that A = [f U ] B, where f U : U U s the restrcton of f to U 40 23 Nlpotent endomorphsms

More information

Using non-preemptive regions and path modification to improve schedulability of real-time traffic over priority-based NoCs

Using non-preemptive regions and path modification to improve schedulability of real-time traffic over priority-based NoCs Real-Tme Syst (2017) 53:886 915 DOI 10.1007/s11241-017-9276-5 Usng non-preemptve regons and path modfcaton to mprove schedulablty of real-tme traffc over prorty-based NoCs Meng Lu 1 Matthas Becker 1 Mors

More information

A New Refinement of Jacobi Method for Solution of Linear System Equations AX=b

A New Refinement of Jacobi Method for Solution of Linear System Equations AX=b Int J Contemp Math Scences, Vol 3, 28, no 17, 819-827 A New Refnement of Jacob Method for Soluton of Lnear System Equatons AX=b F Naem Dafchah Department of Mathematcs, Faculty of Scences Unversty of Gulan,

More information

Overhead-Aware Compositional Analysis of Real-Time Systems

Overhead-Aware Compositional Analysis of Real-Time Systems Overhead-Aware ompostonal Analyss of Real-Tme Systems Lnh T.X. Phan, Meng Xu, Jaewoo Lee, nsup Lee, Oleg Sokolsky PRESE enter Department of omputer and nformaton Scence Unversty of Pennsylvana ompostonal

More information

find (x): given element x, return the canonical element of the set containing x;

find (x): given element x, return the canonical element of the set containing x; COS 43 Sprng, 009 Dsjont Set Unon Problem: Mantan a collecton of dsjont sets. Two operatons: fnd the set contanng a gven element; unte two sets nto one (destructvely). Approach: Canoncal element method:

More information

COMPARISON OF SOME RELIABILITY CHARACTERISTICS BETWEEN REDUNDANT SYSTEMS REQUIRING SUPPORTING UNITS FOR THEIR OPERATIONS

COMPARISON OF SOME RELIABILITY CHARACTERISTICS BETWEEN REDUNDANT SYSTEMS REQUIRING SUPPORTING UNITS FOR THEIR OPERATIONS Avalable onlne at http://sck.org J. Math. Comput. Sc. 3 (3), No., 6-3 ISSN: 97-537 COMPARISON OF SOME RELIABILITY CHARACTERISTICS BETWEEN REDUNDANT SYSTEMS REQUIRING SUPPORTING UNITS FOR THEIR OPERATIONS

More information

Time-Varying Systems and Computations Lecture 6

Time-Varying Systems and Computations Lecture 6 Tme-Varyng Systems and Computatons Lecture 6 Klaus Depold 14. Januar 2014 The Kalman Flter The Kalman estmaton flter attempts to estmate the actual state of an unknown dscrete dynamcal system, gven nosy

More information