Resource Sharing. CSCE 990: Real-Time Systems. Steve Goddard. Resources & Resource Access Control (Chapter 8 of Liu)
|
|
- Martina Williamson
- 5 years ago
- Views:
Transcription
1 CSCE 990: Real-Tme Systems Resource Sharng Steve Goddard Resources & Resource Access Control (Chapter 8 of Lu) Real-Tme Systems Resource Sharng - Untl now, we have assumed that tasks are ndependent. We now remove ths restrcton. We frst consder how to adapt the analyss dscussed prevously when tasks access shared resources. Later, n our dscusson of dstrbuted systems, we wll consder tasks that have precedence constrants. Real-Tme Systems Resource Sharng - 2 2
2 Shared Resources We contnue to consder sngle-processor systems. We add to the model a set of ρ serally reusable resources R, R 2,, R ρ, where there are v unts of resource R.» Examples of resources: Bnary semaphore, for whch there s one unt. Countng semaphore, for whch there may be many unts. Reader/wrter locks. Prnter. Remote server. Locks A ob that wants n unts of resource R executes a lock request, denoted L(R, n). It unlocks the resource by executng a correspondng unlock request, denoted U(R, n). A matchng lock/unlock par s a crtcal secton. A crtcal secton correspondng to n unts of resource R, wth an executon cost of e, wll be denoted [R, n; e]. If n =, then ths s smplfed to [R; e]. Real-Tme Systems Resource Sharng - 3 Real-Tme Systems Resource Sharng
3 Locks can be nested. Locks (Contnued) We wll use notaton lke ths:»[r ; 4 [R 4, 3; 9 [R 5, 4; 3]]] In our analyss, we wll be mostly nterested n outermost crtcal sectons. Note: For smplcty, we only have one knd of lock request.» So, for example, we can t actually dstngush between reader locks and wrter locks. Conflcts Two obs have a resource conflct f some of the resources they requre are the same.» Note that f we had reader/wrter locks, then noton of a conflct would be a lttle more complcated. Two obs contend for a resource when one ob requests a resource that the other ob already has. The scheduler wll always deny a lock request f there are not enough free unts of the resource to satsfy the request. Real-Tme Systems Resource Sharng - 5 Real-Tme Systems Resource Sharng
4 Example Tmng Anomales J When tasks share resources, there may be tmng anomales. Example: Let us reduce J 3 s crtcal secton executon from 4 tme unts to 2.5. Then J msses ts deadlne! J 2 J 3 J = access of sngle-unt resource R J 2 J Real-Tme Systems Resource Sharng - 7 Real-Tme Systems Resource Sharng
5 Prorty Inversons When tasks share resources, there may be prorty nversons. Example: prorty nverson Deadlocks When tasks share resources, deadlocks may be a problem. Example: J accesses green, then red (nested). J 3 accesses red, then green (nested). J J J 2 J 3 J 2 J 3 can t lock green! What s a very smple way to fx ths problem? Real-Tme Systems Resource Sharng - 9 Real-Tme Systems Resource Sharng
6 Wat-for Graphs We wll specfy blockng relatonshps usng a wat-for graph. Specfyng Resource Requrements Resource requrements wll be specfed lke ths: Example: J 2 R, J 3 J 3 has locked the sngle unt of resource R and J 2 s watng to lock t. Queston: Can we use a wat-for graph to determne f there s a deadlock? J Real-Tme Systems Resource Sharng - J J 2 J R J requres the sngle-unt resource R for 2 tme unts. Each ob of T requres 2 unts of R for at most 3 tme unts and one unt of R 2 for at most tme unt. T T 2 (2; 3) T 3 [R 2 ; 8 [R, 4; ][R, ; 5]] 2 T 4 R R 2 Smple resource requrements are shown on edges. Complcated ones by the correspondng task. Real-Tme Systems Resource Sharng
7 Resource Access Control Protocols We now consder several protocols for allocatng resources that control prorty nversons and/or deadlocks. From now on, the term crtcal secton s taken to mean outermost crtcal secton unless specfed otherwse. Real-Tme Systems Resource Sharng - 3 Nonpreemptve Crtcal Secton Protocol The smplest protocol: ust execute each crtcal secton nonpreemptvely. If tasks are ndexed by prorty (or relatve deadlne n the case of EDF), then task T has a blockng term equal to max + k n c k, where c k s the executon cost of the longest crtcal secton of T k. We ve talked before about how to ncorporate such blockng terms nto schedulng analyss. Advantage: Very smple. Dsadvantage: T s blockng term may depend on tasks that t doesn t even have conflcts wth. Real-Tme Systems Resource Sharng
8 The Prorty Inhertance Protocol (Sha, Rakumar, Lehoczky) Observaton: In a system wth lock-based resources, prorty nverson cannot be elmnated. Thus, our only choce s to lmt ther duraton. Consder agan ths example: The Prorty Inhertance Protocol The problem here s not the low-prorty ob J 3 t s the medum prorty ob J 2! We must fnd a way to prevent a medum-prorty ob lke ths from lengthenng the duraton of a prorty nverson. J J J 2 J 2 J 3 J Real-Tme Systems Resource Sharng - 5 Real-Tme Systems Resource Sharng
9 The Prorty Inhertance Protocol Prorty Inhertance Protocol: When a low-prorty ob blocks a hghprorty ob, t nherts the hgh-prorty ob s prorty. Ths prevents an untmely preempton by a medum-prorty ob. PIP Defnton Each ob J k has an assgned prorty (e.g., RM prorty) and a current prorty π k (t).. Schedulng Rule: Ready obs are scheduled on the processor preemptvely n a prorty-drven manner accordng to ther current prortes. At ts release tme t, the current prorty of every ob s equal to ts assgned prorty. The ob remans at ths prorty except under the condton stated n rule 3. J J 2 J 3 executed at J s prorty Allocaton Rule: When a ob J requests a resource R at tme t, (a) f R s free, R s allocated to J untl J releases t, and (b) f R s not free, the request s dened and J s blocked. 3. Prorty-Inhertance Rule: When the requestng ob J becomes blocked, the ob J l that blocks J nherts the current prorty of J. The ob J l executes at ts nherted prorty untl t releases R (or untl t nherts an even hgher prorty); the prorty of J l returns to ts prorty π l (t ) at the tme t when t acqures the resource R. Real-Tme Systems Resource Sharng - 7 Real-Tme Systems Resource Sharng
10 A More Complcated Example (Ths s slghtly dfferent from the example n Fgure 8-8 n the book.) J J J J 2 J 2 J 3 J 4 J 4 J J J J 5 J 5 J 5 J 2 J J Ths means ths porton of the crtcal secton executes at J 2 s prorty Real-Tme Systems Resource Sharng - 9 Propertes of the PIP We have two knds of blockng wth the PIP: drect blockng and nhertance blockng. In the prevous example, J 2 s drectly blocked by J 5 over the nterval [6,9] and s nhertance blocked by J 4 over the nterval [,5]. Jobs can transtvely block each other. At tme.5, J 5 blocks J 4 and J 4 blocks J. The PIP doesn t prevent deadlock. A obs that requres v resources and conflcts wth k lower prorty obs can be blocked for mn(v,k) tmes, each for the duraton of an outermost CS. It s possble to do much better. Real-Tme Systems Resource Sharng
11 The Prorty-Celng Protocol (Sha, Rakumar, Lehoczky) Two key assumptons: The assgned prortes of all obs are fxed (as before). The resources requred by all obs are know a pror before the executon of any ob begns. Defnton: The prorty celng of any resource R s the hghest prorty of all the obs that requre R, and s denoted Π(R). Defnton: The current prorty celng Π (R) of the system s equal to the hghest prorty celng of the resources currently n use, or Ω f no resources are currently n use (Ω s a prorty lower than any real prorty). Note: I ve used nstead of ^ due to PowerPont lmtatons.. Schedulng Rule: PCP Defnton (a) At ts release tme t, the current prorty π(t) of every ob J equals ts assgned prorty. The ob remans at ths prorty except under the condtons of rule 3. (b) Every ready ob J s scheduled preemptvely and n a prorty-drven manner at ts current prorty π(t). 2. Allocaton Rule: Whenever a ob J requests a resource R at tme t, one of the followng two condtons occurs: (a) R s held by another ob. J s request fals and J becomes blocked. (b) R s free. () If J s prorty π(t) s hgher than the current prorty celng Π (t), R s allocated to J. () If J s prorty π(t) s not hgher than the celng Π (t), R s allocated to J only f J s the ob holdng the resource(s) whose prorty celng equals Π (t); otherwse, J s request s dened and J becomes blocked. 3. Prorty-Inhertance Rule: When J becomes blocked, the ob J l that blocks J nherts the current prorty π(t) of J. J l executes at ts nherted prorty untl t releases every resource whose prorty celng s π(t) (or untl t nherts an even hgher prorty); at that tme, the prorty of J l returns to ts prorty π(t ) at the tme t when t was granted the resources. Real-Tme Systems Resource Sharng - 2 Real-Tme Systems Resource Sharng
12 Example (Ths s the PCP counterpart of our complcated PIP example.) J J J J 2 J 2 J 3 J 4 J J J J 5 J 5 J 5 J 4 J 2 J Propertes of the PCP The PCP s not greedy. For example, J 4 n the example s prevented from lockng the green obect, even though t s free. We now have three knds of blockng:» Drect blockng (as before). For example, J 5 drectly blocks J 2 at tme 6.» Prorty-nhertance blockng (also as before). Ths doesn t occur n our example.» Prorty-celng blockng (ths s new). J 4 suffers a prorty-celng blockng at tme 3. Real-Tme Systems Resource Sharng - 23 Real-Tme Systems Resource Sharng
13 Two Theorems Theorem 8-: When the resource accesses of a system of preemptve, prorty-drven obs on one processor are controlled by the PCP, deadlock can never occur. Deadlock Avodance Wth the PIP, deadlock could occur f nested crtcal sectons are nvoked n an nconsstent order. Here s an example we looked at earler. Example: J accesses green, then red (nested). J 3 accesses red, then green (nested). J Theorem 8-2: When the resource accesses of a system of preemptve, prorty-drven obs on one processor are controlled by the PCP, a ob can be blocked for at most the duraton of one crtcal secton. J 2 J 3 can t lock green! The PCP would prevent J from lockng green. Why? Real-Tme Systems Resource Sharng - 25 Real-Tme Systems Resource Sharng
14 Blockng Term Suppose J blocks when accessng the green crtcal secton and later blocks when accessng the red crtcal secton. Blockng Term For J block on green, some lower-prorty ob must have held the lock on green when J began to execute. J blocks on green J blocks on green J Real-Tme Systems Resource Sharng - 27 Real-Tme Systems Resource Sharng
15 Blockng Term For J to later block on red, some lower-prorty ob must have held the lock on red when J began executng. Blockng Term Whchever way J 2 and J 3 are prortzed (here, J 2 has prorty over J 3 ), we have a contradcton. Why? J blocks on green blocks on red J blocks on green blocks on red J 2 J 2 J 3 J Real-Tme Systems Resource Sharng - 29 Real-Tme Systems Resource Sharng
16 Some Comments on the PCP When computng blockng terms, t s mportant to carefully consder all three knds of blockngs (drect, nhertance, celng).» See the book for an example where ths s done systematcally (Fgure 8-5). Wth the PCP, we have to pay for extra two context swtches per blockng term.» Such context swtchng costs can really add up n a large system.» Ths s the motvaton for the Stack Resource Polcy (SRP), descrbed next. Real-Tme Systems Resource Sharng - 3 Stack-based Resource Sharng So far, we have assumed that each task has ts own runtme stack. In many systems, tasks can share a run-tme task. Ths can lead to memory savngs because there s less fragmentaton. Real-Tme Systems Resource Sharng
17 Stack-based Resource Sharng (Cont d) If tasks share a runtme stack, we clearly cannot allow a schedule lke the followng. (Why?) J J 2 We must delay the executon of each ob untl we are sure all the resources t needs are avalable. Real-Tme Systems Resource Sharng - 33 Stack Resource Polcy (Baker) 0. Update of the Current Celng: Whenever all the resources are free, the celng of the system s Ω. The celng Π (t) s updated each tme a resource s allocated or freed.. Schedulng Rule: After a ob s released, t s blocked from startng executng untl ts assgned prorty s hgher than the current celng Π (t) of the system. At all tmes, obs that are not blocked are scheduled on the processor n prorty-drven, preemptve manner accordng to ther assgned prortes. 2. Allocaton Rule: Whenever a ob requests a resource, t s allocated the resource. Note: Can be mplemented usng a sngle runtme stack, but ths sn t requred. Real-Tme Systems Resource Sharng
18 J J 2 J 3 J 4 J 5 Example (Ths s the SRP counterpart of our complcated example.) Notce how J 4 ncurs ts blockng term up front, before t actually starts to execute Propertes of the SRP No ob s ever blocked once ts executon begns.» Thus, there can never be any deadlock. The blockng term calculaton s the same as wth the PCP.» Convnce yourself of ths!» One dfference, though: Wth the SRP, a ob s blocked only before t begns executon, so extra context swtches due to blockngs are avoded. Real-Tme Systems Resource Sharng - 35 Real-Tme Systems Resource Sharng
19 Schedulng, Revsted We have already talked about how to ncorporate blockng terms nto schedulng condtons. For example, wth TDA and generalzed TDA, we changed our tmedemand functon by addng a blockng term. For TDA, we got ths: w (t) = e + b + k= t p k e for 0 < t mn(d, p ) For EDF-scheduled systems, we stated the followng utlzaton-based condton: n ek b + mn(d,p ) mn(d, p ) k= k k k A Closer Look at Dynamc-Prorty Systems It turns out that ths EDF condton s not very tght. We now cover a paper by Jeffay that presents a much tghter condton.» Although t may not seem lke t on frst readng, Jeffay s paper bascally renvents the SRP, but for dynamcprorty systems.» However, the schedulng analyss for dynamc-prorty systems gven by Jeffay s much better than that found elsewhere. Real-Tme Systems Resource Sharng - 37 Real-Tme Systems Resource Sharng
20 Schedulng Sporadc Tasks wth Shared Resources (Jeffay) In the model of ths paper, each task T s parttoned nto n dstnct phases.» In each phase, ether no resource s requred or exactly one resource s requred.» If resource R k s requred by T s th phase, then we denote ths by r = k, where k m.» If no resource s requred, then r = 0. Sngle-Phase Systems In a sngle-phase system, each task s ether a crtcal secton that accesses some resource, or a non-crtcal secton that accesses no resource. Notaton: Each task T wll be denoted by (s, (c, C, r ), p ) where: s s ts release tme; c s ts mnmum executon cost; C s ts maxmum executon cost; r ndcates whch (f any) resource s accessed; p s ts perod. Defnton: We let P denote the perod of the shortest task that requres resource R,.e., P = mn n (p r = ). Real-Tme Systems Resource Sharng - 39 Real-Tme Systems Resource Sharng
21 Necessary Schedulng Condton Theorem 3.2: Let T = {T, T 2,, T n } be a system of sngle-phase, sporadc tasks wth relatve deadlnes equal to ther perods such that the tasks n T are ndexed n non-decreasng order by perod (.e., f <, then p p ). If T s schedulable on a sngle processor, then: n C ) = p - L 2) : n r < < + 0 :: L :Pr L p :: L C C = p Compare ths to the feasblty condton we had for nonpreemptve EDF, whch s repeated on the followng slde. Real-Tme Systems Resource Sharng - 4 Non-preemptve EDF, Revsted Theorem : Let T = {T, T 2,, T n } be a system of ndependent, perodc tasks wth relatve deadlnes equal to ther perods such that the tasks n T are ndexed n non-decreasng order by perod (.e., f <, then p p ). T can be scheduled by the non-preemptve EDF algorthm f: n e ) = p 2) : n :: L : p < L < p :: L e + = L e p Remember, we showed ths condton s also necessary for sporadc tasks. Real-Tme Systems Resource Sharng
22 Proof Sketch of Theorem 3.2 Gven our prevous dscusson of nonpreemptve EDF, Theorem 3.2 should be pretty obvous. Clearly, f T s schedulable, total utlzaton must be at most one,.e., condton () must hold. Condton (2) accounts for the worst-case blockng that can be experenced by each task T. Remember, wth nonpreemptve EDF, the worst-case pattern of ob releases occurs when a ob of some T begns executng (non-preemptvely!) one tme unt before some tasks wth smaller perods begn releasng some obs. Real-Tme Systems Resource Sharng - 43 Here s an llustraton: T T T 2 T 3 Proof Sketch (Contnued) Moreover, wth sporadc tasks, such releases are always possble, and thus f T s schedulable, then t s necessary to ensure no deadlne s mssed n the face of ob releases lke ths. In a sngle-phase system, we have the same knd of necessary condton, but now a task may only be blocked by a task that accesses a common resource. Real-Tme Systems Resource Sharng
23 EDF-DDM Our goal now s to defne a schedulng algorthm for whch the condtons of Theorem 3.2 are necessary. Snce EDF s optmal n the absence of resources, t makes sense to look at some varant of EDF. Remember wth the PIP, PCP, and SRP, the dea s to rase a lower-prorty ob s prorty when a blockng occurs. Wth EDF, rasng a prorty means temporarly shrnkng the ob s deadlne. The resultng scheme s called EDF wth dynamc deadlne modfcaton. Real-Tme Systems Resource Sharng - 45 Example Here s what can happen wthout dynamc deadlne modfcaton: T 3 T T 2 Here s the correspondng schedule wth dynamc deadlne modfcaton: T T T Notce that T 2 does not preempt T at tme. Real-Tme Systems Resource Sharng
24 EDF/DDM Defnton Let t r be the tme when ob J of task T s released, and let t s be the tme ob J starts to execute. In the nterval [t r, t s ), J s deadlne s t r + p, ust lke wth EDF.» Ths s called J s ntal deadlne. At tme t s, J s deadlne s changed to mn(t r + p, (t s + ) + P r ).» Ths s called J s contendng deadlne. Suffcent Condton for EDF/DDM Theorem 3.4: Let T = {T, T 2,, T n } be a system of sngle-phase, sporadc tasks wth relatve deadlnes equal to ther perods such that the tasks n T are ndexed n non-decreasng order by perod (.e., f <, then p p ). The EDF/DDM dscplne wll succeed n schedulng T f condtons () and (2) from Theorem 3.2 hold. Thus, by Theorem 3.2, () and (2) are feasblty condtons. Not surprsngly, the proof of Theorem 3.4 s very smlar to the correspondng proof we dd for nonpreemptve EDF systems. Real-Tme Systems Resource Sharng - 47 Real-Tme Systems Resource Sharng
25 Proof of Theorem 3.4 Suppose condtons () and (2) hold for T but a deadlne s mssed. Let t d be the earlest pont n tme at whch a deadlne s mssed. There are two cases. Case : No ob wth an ntal deadlne after tme t d s scheduled pror to tme t d. The analyss s ust lke wth preemptve EDF. As before, let t - be the last dle nstant. (Ths s denoted t 0 n the paper, but I ve used t - to be consstent wth prevous proofs.) Because a deadlne s mssed at t d, demand over [t -, t d ] exceeds t d t -. In addton, ths demand s at most =,..,n (t d t - )/p C. Thus, we have t d t - < =,..,n (t d t - )/p C =,..,n [(t d t - )/p ] C. Ths mples utlzaton exceeds one, whch contradcts condton (). Real-Tme Systems Resource Sharng - 49 Proof (Contnued) Case 2: Some ob wth an ntal deadlne after tme t d s scheduled pror to tme t d. Let T be the task wth the last ob wth an ntal deadlne after t d that s scheduled pror to t d. Then, we have the followng: Tme T t Let us bound the processor demand n [t, t d ] (Ths s where thngs start to get a lttle dfferent from the nonpreemptve EDF proof.) Real-Tme Systems Resource Sharng - 50 t d 49 50
26 Proof (Contnued) Case 2a: T s contendng deadlne s less than or equal to t d. Ths means T must be a resource requestng task. We have the followng: Observe the followng: Proof (Contnued)» Other than task T, no task wth a perod greater than or equal to t d t executes n the nterval [t, t d ]. Such a task would contradct our choce of T. Tme T contendng ntal» Other than T, no task that executes n [t, t d ] could have been nvoked at tme t. t The proof for ths subcase s very much lke Case 2 n the nonpreemptve EDF proof (we get a contradcton of condton (2)). t d» The processor s fully utlzed n [t, t d ]. Real-Tme Systems Resource Sharng - 5 Real-Tme Systems Resource Sharng
27 Proof (Contnued) From these facts, we conclude that demand over [t, t d ] s less than or equal to - t d (t + ) C + C. = p Let L = t d t. We have p > L > P r. (Why?) Also, - L L < C + C. = p Ths contradcts condton (2). Proof (Contnued) Case 2b: T s contendng deadlne s greater than t d. Ths means ether T doesn t request any resource or (t + ) + P r > t d. We have the followng: Tme T t t d contendng T s preemptable by any ob whose perod les wth [t, t d ]. (Why?) Real-Tme Systems Resource Sharng - 53 Real-Tme Systems Resource Sharng
28 Proof (Contnued) Let t - > t be the later of the end of the last dle perod n [t, t d ] or the tme T last stops executng pror to t d. All nvocatons of tasks occurrng pror to t - wth deadlnes less than or equal to t d must have completed executng by t -. (Why?) Tme T t As n Case, we can show that demand over [t -, t d ] exceeds t d t -, whch mples that condton () s volated. t - t d contendng Mult-Phase Systems Notaton: In a mult-phase system, each task T s denoted by (s, (c, C, r ), p ), n, n, where: s s ts release tme; n s the number of phases n each ob of T ; c s the mnmum executon cost of the th phase; C s the maxmum executon cost of the th phase; r ndcates whch (f any) resource s accessed n the th phase; p s ts perod. Defnton: We let P rk = mn n (p r l = r k for some l n the range l n ). Defnton: The executon cost of T s E = k =,,n C k. Real-Tme Systems Resource Sharng - 55 Real-Tme Systems Resource Sharng
29 Necessary Schedulng Condton Theorem 4.: Let T = {T, T 2,, T n } be a system of mult-phase, sporadc tasks wth relatve deadlnes equal to ther perods such that the tasks n T are ndexed n non-decreasng order by perod (.e., f <, then p p ). If T s schedulable on a sngle processor, then: n E ) = p 2) (, k : n k n r 0 :: L : Pr < L < p Sk :: L C + k k 0 f k = where Sk = k < c = f k n k Ugh! - = L E p Real-Tme Systems Resource Sharng - 57 EDF/DDM for Mult-phase Systems Let t r be the tme when ob J of task T s released, and let t sk be the tme ob J s k th phase starts to execute. In the nterval [t r, t s ), J s deadlne s t r + p, ust lke wth EDF. At tme t sk, J s deadlne s changed to mn(t r + p, (t sk + ) + P rk ). When one of J s phases completes, ts deadlne mmedately reverts to t r + p. Note that ths algorthm prevents a ob from begnnng executon untl all the resources t requres are avalable,.e., ths s ust a dynamc-prorty SRP. Real-Tme Systems Resource Sharng
30 Suffcent Condton for EDF/DDM An Alternatve to Crtcal Sectons Theorem 4.3: Let T = {T, T 2,, T n } be a system of mult-phase, sporadc tasks wth relatve deadlnes equal to ther perods such that the tasks n T are ndexed n non-decreasng order by perod (.e., f <, then p p ). The EDF/DDM dscplne wll succeed n schedulng T f condtons () and (2) from Theorem 4. hold. Thus, by Theorem 4., () and (2) are feasblty condtons for mult-phase, sporadc task systems. We wll not cover the proofs of Theorems 4. and 4.3 n class, but you should read through them n the paper. Real-Tme Systems Resource Sharng - 59 Crtcal sectons are often used to mplement software shared obects.» Example: producer/consumer buffer. Such obects actually can be mplemented wthout usng crtcal sectons or related mechansms. Such shared-obect algorthms are called nonblockng algorthms. Bottom Lne: We can avod prorty nversons altogether when mplementng software shared obects. Real-Tme Systems Resource Sharng
31 Nonblockng Algorthms Two varants:» Lock-Free: Perform operatons optmstcally. Retry operatons that are nterfered wth.» Wat-Free: No watng of any knd: No busy-watng. No blockng synchronzaton constructs. No unbounded retres. Recent research at UNC has shown how to account for lock-free and wat-free overheads n schedulng analyss. Frst, some background Real-Tme Systems Resource Sharng - 6 type Qtype = record v: valtype; next: ponter to Qtype end shared var Tal: ponter to Qtype; local var old, new: ponter to Qtype old Tal Lock-Free Example procedure Enqueue (nput: valtype) new := (nput, NIL); repeat old := Tal untl CAS2(&Tal, &(old->next), old, NIL, new, new) new old Tal new Real-Tme Systems Resource Sharng
32 current copy ponter to shared obect Wat-Free Algorthms (Herlhy s Helpng Scheme) process p s copy process q s copy process r s copy announce array Can only retry once! Dsadvantage: Copyng overhead. Algorthm: announce operaton; retry untl done: create local copy of the obect; apply all announced operatons on local copy; attempt to make local copy the current copy usng a strong synchronzaton prmtve Real-Tme Systems Resource Sharng - 63 Usng Wat-Free Algorthms n Realtme Systems On unprocesors, helpng-based algorthms are not very attractve.» Only hgh-prorty tasks help lower-prorty tasks. Smlar to prorty nverson.» Such algorthms can have hgh overhead due to copyng and havng to use costly synchronzaton prmtves. Some wat-free algorthms avod these problems and are useful. Example: Collson avodng read/wrte buffers. On the other hand, on multprocessors, wat-free algorthms may be the best choce. Real-Tme Systems Resource Sharng
33 Usng Lock-Free Obects on Real-tme Unprocessors (Anderson, Ramamurthy, Jeffay) Advantages of Lock-free Obects:» No prorty nversons.» Lower overhead than helpng-based wat-free obects.» Overhead s charged to low-prorty tasks. But:» Access tmes are potentally unbounded. Schedulng wth Lock-Free Obects On a unprocessor, lock-free retres really aren t unbounded. A task fals to update a shared obect only f preempted durng ts obect call. Hgh Low Faled retry-loop Successful retry-loop Can compute a bound on retres by countng preemptons. Real-Tme Systems Resource Sharng - 65 Real-Tme Systems Resource Sharng
34 67 Real-Tme Systems Resource Sharng - 67 RM Suffcent Condton Assume rate-monotonc prorty assgnment. Suffcent Schedulng Condton: + < = = t s p t e p t :: p t 0 : t :: In ths condton, s s the tme to update a lock-free obect (one retry loop teraton). We are assumng at ths pont that all retry loops have the same cost. 68 Real-Tme Systems Resource Sharng - 68 Proof of RM Condton The proof strategy should be very famlar to you by now. To Prove: If a task set s not schedulable, then the suffcent condton does not hold,.e., > + < = = t s p t e p t :: p t 0 : t ::
35 Settng Up the Proof Let the k th ob of T be the frst to mss ts deadlne. Let t - be the latest dle nstant before r,k+. Intuton If a task set s not schedulable, then at all nstants t n (t -,r,k+ ], Hgh Med T s t - r,k r,k+ Faled retry-loop Successful retry-loop the demand placed on the processor by T and hgher-prorty tasks n [t -,t) s greater than the avalable processor tme n [t -,t). Suppose not: Case t (t -,r,k ]: Contradcts choce of t -. Case t (r,k,r,k+ ]: T s deadlne at r,k+ s not mssed. Real-Tme Systems Resource Sharng - 69 Real-Tme Systems Resource Sharng
36 Fnshng the Proof... Fnshng the Proof For any t n (t -,r,k+ ], the followng holds. avalable processor tme n [t -,t) < demand due to T and hgher-prorty obs n [t -,t) = demand due to ob releases of T and hgher-prorty tasks + demand due to faled loop tres n T and hgher-prorty tasks =, (number of obs of T released n [t -,t) ) e + =,- (number of preemptons T can cause n T and hgher-prorty tasks) (cost of faled loop try) Hence, for any t n (t -,r,k+ ], t t t t t t < e + s. = p = p Replacng t t - by t n (0, r,k+ t - ], t < = t e p t = + s. p Real-Tme Systems Resource Sharng - 7 Real-Tme Systems Resource Sharng
37 EDF Suffcent Condton Assume earlest-deadlne-frst prorty assgnment. Suffcent Condton: N = e + s p Settng Up the Proof... Same set-up as before s As before To Prove: If a task set T s not schedulable, then N = e + s > p T t- r,k r,k+ Faled retry-loop Successful retry-loop Real-Tme Systems Resource Sharng - 73 Real-Tme Systems Resource Sharng
38 Intuton Fnshng the Proof... avalable processor tme n [t -,r,k+ ] If a task set s not schedulable, then the demand placed on the processor n [t -,r,k+ ) by obs wth deadlnes at or before r,k+ s greater than the avalable processor tme n [t -,r,k+ ]. < demand due to obs wth deadlnes r,k+ = demand due to releases of those obs + demand due to faled loop tres n those obs =,,N [number of obs of T wth deadlnes at or before r,k+ released n [t -,r,k+ )] e + =,,N (number of preemptons T can cause n such obs) (cost of faled loop try) Real-Tme Systems Resource Sharng - 75 Real-Tme Systems Resource Sharng
39 Hence, whch mples, Fnshng the Proof r t r t N N,k+,k+, k+ t < e + s, = p = p r r t N N,k+,k+, k+ t < e + s. = p = p r Cancelng r,k+ t - yelds < N e p + N = = s p. r t Real-Tme Systems Resource Sharng - 77 Comparson of Lock-Free & Lock-Based It can be shown analytcally that lock-free wns over lock-based f:» (lock-free access cost) (lock-based access cost)/2. For many obects, ths wll be the case, because wth a lockbased mplementaton, you get one obect access for the prce of many (due to all the kernel obects that have to be accessed). Breakdown utlzaton experments nvolvng randomly-generated task sets show that lock-free s lkely to wn f:» (lock-free access cost) (lock-based access cost). Real-Tme Systems Resource Sharng
40 Better Schedulng Condtons Prevous condtons perform poorly when retry loop costs vary wdely. Also, they over-count nterferences (not every preempton causes an nterference). Queston: How to ncorporate dfferent retry loop costs? Answer: Use lnear programmng.» Can apply lnear programmng to both RM and EDF (and also DM).» We only consder RM here. Real-Tme Systems Resource Sharng - 79 Lnear-Programmng RM Condton (Anderson and Ramamurthy) Defnton: E (t) w() = v= l= m,v l (t)s,v l w() - Number of phases of T. m l,v (t) - Number of nterferences n T s v th phase due to T l n an nterval of length t. s l,v - Cost of one such nterference. Approach: Vew E (t) as a lnear expresson, where m l,v (t) are the varables. Maxmze E (t) subect to some constrants. Real-Tme Systems Resource Sharng
41 8 Real-Tme Systems Resource Sharng - 8 LP RM Condton (Contnued) Example Constrants (the easy ones): Let E (t) be an upper bound on E (t) obtaned by lnear programmng. RM Condton: + < = t ) (t E e p t :: p t 0 : t + < = w() v,v p t (t) m :: :, + = = = = w() v,v p t (t) m :: l l
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 informationEmbedded 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 informationLast 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 informationCritical 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 informationComputer 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 informationModule 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 informationLecture 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 informationTwo 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 informationfind (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 informationAN EXTENDIBLE APPROACH FOR ANALYSING FIXED PRIORITY HARD REAL-TIME TASKS
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
More informationCHAPTER 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 informationChapter 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 informationEconomics 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 informationCHAPTER 5 NUMERICAL EVALUATION OF DYNAMIC RESPONSE
CHAPTER 5 NUMERICAL EVALUATION OF DYNAMIC RESPONSE Analytcal soluton s usually not possble when exctaton vares arbtrarly wth tme or f the system s nonlnear. Such problems can be solved by numercal tmesteppng
More informationScheduling 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 informationProblem 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 informationStructure 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 informationCollege 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 informationWinter 2008 CS567 Stochastic Linear/Integer Programming Guest Lecturer: Xu, Huan
Wnter 2008 CS567 Stochastc Lnear/Integer Programmng Guest Lecturer: Xu, Huan Class 2: More Modelng Examples 1 Capacty Expanson Capacty expanson models optmal choces of the tmng and levels of nvestments
More informationParametric 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 informationSimultaneous 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 informationThe Multiple Classical Linear Regression Model (CLRM): Specification and Assumptions. 1. Introduction
ECONOMICS 5* -- NOTE (Summary) ECON 5* -- NOTE The Multple Classcal Lnear Regresson Model (CLRM): Specfcaton and Assumptons. Introducton CLRM stands for the Classcal Lnear Regresson Model. The CLRM s also
More information2E 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 informationThe 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 informationLimited 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 informationAssortment 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 informationResource 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 informationCSci 6974 and ECSE 6966 Math. Tech. for Vision, Graphics and Robotics Lecture 21, April 17, 2006 Estimating A Plane Homography
CSc 6974 and ECSE 6966 Math. Tech. for Vson, Graphcs and Robotcs Lecture 21, Aprl 17, 2006 Estmatng A Plane Homography Overvew We contnue wth a dscusson of the major ssues, usng estmaton of plane projectve
More informationA 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 information4DVAR, according to the name, is a four-dimensional variational method.
4D-Varatonal Data Assmlaton (4D-Var) 4DVAR, accordng to the name, s a four-dmensonal varatonal method. 4D-Var s actually a drect generalzaton of 3D-Var to handle observatons that are dstrbuted n tme. The
More informationFixed-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 informationWeek3, Chapter 4. Position and Displacement. Motion in Two Dimensions. Instantaneous Velocity. Average Velocity
Week3, Chapter 4 Moton n Two Dmensons Lecture Quz A partcle confned to moton along the x axs moves wth constant acceleraton from x =.0 m to x = 8.0 m durng a 1-s tme nterval. The velocty of the partcle
More information3.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 informationSingle-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 informationA 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 informationIntroduction to Vapor/Liquid Equilibrium, part 2. Raoult s Law:
CE304, Sprng 2004 Lecture 4 Introducton to Vapor/Lqud Equlbrum, part 2 Raoult s Law: The smplest model that allows us do VLE calculatons s obtaned when we assume that the vapor phase s an deal gas, and
More informationNP-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 informationEEE 241: Linear Systems
EEE : Lnear Systems Summary #: Backpropagaton BACKPROPAGATION The perceptron rule as well as the Wdrow Hoff learnng were desgned to tran sngle layer networks. They suffer from the same dsadvantage: they
More informationOutline. 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 informationFixed-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 informationLINEAR 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 informationErrors for Linear Systems
Errors for Lnear Systems When we solve a lnear system Ax b we often do not know A and b exactly, but have only approxmatons  and ˆb avalable. Then the best thng we can do s to solve ˆx ˆb exactly whch
More informationPhysics 5153 Classical Mechanics. Principle of Virtual Work-1
P. Guterrez 1 Introducton Physcs 5153 Classcal Mechancs Prncple of Vrtual Work The frst varatonal prncple we encounter n mechancs s the prncple of vrtual work. It establshes the equlbrum condton of a mechancal
More informationClock-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 informationLecture 4: Universal Hash Functions/Streaming Cont d
CSE 5: Desgn and Analyss of Algorthms I Sprng 06 Lecture 4: Unversal Hash Functons/Streamng Cont d Lecturer: Shayan Oves Gharan Aprl 6th Scrbe: Jacob Schreber Dsclamer: These notes have not been subjected
More informationEEL 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 informationImproved 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 informationEcon107 Applied Econometrics Topic 3: Classical Model (Studenmund, Chapter 4)
I. Classcal Assumptons Econ7 Appled Econometrcs Topc 3: Classcal Model (Studenmund, Chapter 4) We have defned OLS and studed some algebrac propertes of OLS. In ths topc we wll study statstcal propertes
More informationLecture 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 informationCalculation of time complexity (3%)
Problem 1. (30%) Calculaton of tme complexty (3%) Gven n ctes, usng exhaust search to see every result takes O(n!). Calculaton of tme needed to solve the problem (2%) 40 ctes:40! dfferent tours 40 add
More informationAdditional Codes using Finite Difference Method. 1 HJB Equation for Consumption-Saving Problem Without Uncertainty
Addtonal Codes usng Fnte Dfference Method Benamn Moll 1 HJB Equaton for Consumpton-Savng Problem Wthout Uncertanty Before consderng the case wth stochastc ncome n http://www.prnceton.edu/~moll/ HACTproect/HACT_Numercal_Appendx.pdf,
More informationModule 3 LOSSY IMAGE COMPRESSION SYSTEMS. Version 2 ECE IIT, Kharagpur
Module 3 LOSSY IMAGE COMPRESSION SYSTEMS Verson ECE IIT, Kharagpur Lesson 6 Theory of Quantzaton Verson ECE IIT, Kharagpur Instructonal Objectves At the end of ths lesson, the students should be able to:
More informationReal-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 informationModule 2. Random Processes. Version 2 ECE IIT, Kharagpur
Module Random Processes Lesson 6 Functons of Random Varables After readng ths lesson, ou wll learn about cdf of functon of a random varable. Formula for determnng the pdf of a random varable. Let, X be
More informationMore 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 informationLimited Dependent Variables
Lmted Dependent Varables. What f the left-hand sde varable s not a contnuous thng spread from mnus nfnty to plus nfnty? That s, gven a model = f (, β, ε, where a. s bounded below at zero, such as wages
More informationcoordinates. Then, the position vectors are described by
Revewng, what we have dscussed so far: Generalzed coordnates Any number of varables (say, n) suffcent to specfy the confguraton of the system at each nstant to tme (need not be the mnmum number). In general,
More informationComplete subgraphs in multipartite graphs
Complete subgraphs n multpartte graphs FLORIAN PFENDER Unverstät Rostock, Insttut für Mathematk D-18057 Rostock, Germany Floran.Pfender@un-rostock.de Abstract Turán s Theorem states that every graph G
More informationSection 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 informationMMA 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 informationECE559VV 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 informationTask Scheduling with Self-Suspensions in Soft Real-Time Multiprocessor Systems
ask Schedulng wth Self-Suspensons n Soft Real-me Multprocessor Systems Cong Lu and James H. Anderson Department of Computer Scence, Unversty of North Carolna at Chapel Hll Abstract Job release Job deadlne
More informationParallel Real-Time Scheduling of DAGs
Washngton Unversty n St. Lous Washngton Unversty Open Scholarshp All Computer Scence and Engneerng Research Computer Scence and Engneerng Report Number: WUCSE-013-5 013 Parallel Real-Tme Schedulng of DAGs
More informationFoundations 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 informationAnnexes. EC.1. Cycle-base move illustration. EC.2. Problem Instances
ec Annexes Ths Annex frst llustrates a cycle-based move n the dynamc-block generaton tabu search. It then dsplays the characterstcs of the nstance sets, followed by detaled results of the parametercalbraton
More informationGlobal 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 informationImproving 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 informationQuantifying 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 informationManaging Capacity Through Reward Programs. on-line companion page. Byung-Do Kim Seoul National University College of Business Administration
Managng Caacty Through eward Programs on-lne comanon age Byung-Do Km Seoul Natonal Unversty College of Busness Admnstraton Mengze Sh Unversty of Toronto otman School of Management Toronto ON M5S E6 Canada
More informationDynamic Programming. Preview. Dynamic Programming. Dynamic Programming. Dynamic Programming (Example: Fibonacci Sequence)
/24/27 Prevew Fbonacc Sequence Longest Common Subsequence Dynamc programmng s a method for solvng complex problems by breakng them down nto smpler sub-problems. It s applcable to problems exhbtng the propertes
More informationOn the correction of the h-index for career length
1 On the correcton of the h-ndex for career length by L. Egghe Unverstet Hasselt (UHasselt), Campus Depenbeek, Agoralaan, B-3590 Depenbeek, Belgum 1 and Unverstet Antwerpen (UA), IBW, Stadscampus, Venusstraat
More informationCS : Algorithms and Uncertainty Lecture 17 Date: October 26, 2016
CS 29-128: Algorthms and Uncertanty Lecture 17 Date: October 26, 2016 Instructor: Nkhl Bansal Scrbe: Mchael Denns 1 Introducton In ths lecture we wll be lookng nto the secretary problem, and an nterestng
More informationprinceton 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= 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 informationIntroduction to Continuous-Time Markov Chains and Queueing Theory
Introducton to Contnuous-Tme Markov Chans and Queueng Theory From DTMC to CTMC p p 1 p 12 1 2 k-1 k p k-1,k p k-1,k k+1 p 1 p 21 p k,k-1 p k,k-1 DTMC 1. Transtons at dscrete tme steps n=,1,2, 2. Past doesn
More informationHomework Assignment 3 Due in class, Thursday October 15
Homework Assgnment 3 Due n class, Thursday October 15 SDS 383C Statstcal Modelng I 1 Rdge regresson and Lasso 1. Get the Prostrate cancer data from http://statweb.stanford.edu/~tbs/elemstatlearn/ datasets/prostate.data.
More informationSynchronization Protocols. Task Allocation Bin-Packing Heuristics: First-Fit Subtasks assigned in arbitrary order To allocate a new subtask T i,j
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
More informationLecture 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 informationTuring 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 informationFREQUENCY DISTRIBUTIONS Page 1 of The idea of a frequency distribution for sets of observations will be introduced,
FREQUENCY DISTRIBUTIONS Page 1 of 6 I. Introducton 1. The dea of a frequency dstrbuton for sets of observatons wll be ntroduced, together wth some of the mechancs for constructng dstrbutons of data. Then
More informationLecture 10 Support Vector Machines II
Lecture 10 Support Vector Machnes II 22 February 2016 Taylor B. Arnold Yale Statstcs STAT 365/665 1/28 Notes: Problem 3 s posted and due ths upcomng Frday There was an early bug n the fake-test data; fxed
More information18.1 Introduction and Recap
CS787: Advanced Algorthms Scrbe: Pryananda Shenoy and Shjn Kong Lecturer: Shuch Chawla Topc: Streamng Algorthmscontnued) Date: 0/26/2007 We contnue talng about streamng algorthms n ths lecture, ncludng
More informationCurve Fitting with the Least Square Method
WIKI Document Number 5 Interpolaton wth Least Squares Curve Fttng wth the Least Square Method Mattheu Bultelle Department of Bo-Engneerng Imperal College, London Context We wsh to model the postve feedback
More informationGrover 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 informationQuantifying 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 informationOutline and Reading. Dynamic Programming. Dynamic Programming revealed. Computing Fibonacci. The General Dynamic Programming Technique
Outlne and Readng Dynamc Programmng The General Technque ( 5.3.2) -1 Knapsac Problem ( 5.3.3) Matrx Chan-Product ( 5.3.1) Dynamc Programmng verson 1.4 1 Dynamc Programmng verson 1.4 2 Dynamc Programmng
More informationOn the Scheduling of Mixed-Criticality Real-Time Task Sets
On the Schedulng of Mxed-Crtcalty Real-Tme Task Sets Donso de Nz, Karthk Lakshmanan, and Ragunathan (Raj) Rajkumar Carnege Mellon Unversty, Pttsburgh, PA - 15232 Abstract The functonal consoldaton nduced
More informationThe 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 informationMATH 829: Introduction to Data Mining and Analysis The EM algorithm (part 2)
1/16 MATH 829: Introducton to Data Mnng and Analyss The EM algorthm (part 2) Domnque Gullot Departments of Mathematcal Scences Unversty of Delaware Aprl 20, 2016 Recall 2/16 We are gven ndependent observatons
More informationLecture 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 informationAn Integrated OR/CP Method for Planning and Scheduling
An Integrated OR/CP Method for Plannng and Schedulng John Hooer Carnege Mellon Unversty IT Unversty of Copenhagen June 2005 The Problem Allocate tass to facltes. Schedule tass assgned to each faclty. Subect
More information1 Convex Optimization
Convex Optmzaton We wll consder convex optmzaton problems. Namely, mnmzaton problems where the objectve s convex (we assume no constrants for now). Such problems often arse n machne learnng. For example,
More informationMean Field / Variational Approximations
Mean Feld / Varatonal Appromatons resented by Jose Nuñez 0/24/05 Outlne Introducton Mean Feld Appromaton Structured Mean Feld Weghted Mean Feld Varatonal Methods Introducton roblem: We have dstrbuton but
More informationDifference 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 informationStanford University CS359G: Graph Partitioning and Expanders Handout 4 Luca Trevisan January 13, 2011
Stanford Unversty CS359G: Graph Parttonng and Expanders Handout 4 Luca Trevsan January 3, 0 Lecture 4 In whch we prove the dffcult drecton of Cheeger s nequalty. As n the past lectures, consder an undrected
More informationEmbedded Systems Development
Embedded Systems Development Leture eal-tme Shedulng Dr. Danel Kästner AbsInt Angewandte Informat GmbH aestner@absnt.om Leture Evaluaton Please do leture evaluaton Deadlne tomorrow! http://www.lx.un-saarland.de
More informationFinding Dense Subgraphs in G(n, 1/2)
Fndng Dense Subgraphs n Gn, 1/ Atsh Das Sarma 1, Amt Deshpande, and Rav Kannan 1 Georga Insttute of Technology,atsh@cc.gatech.edu Mcrosoft Research-Bangalore,amtdesh,annan@mcrosoft.com Abstract. Fndng
More informationFeature 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 informationPartitioned Mixed-Criticality Scheduling on Multiprocessor Platforms
Parttoned Mxed-Crtcalty Schedulng on Multprocessor Platforms Chuanca Gu 1, Nan Guan 1,2, Qngxu Deng 1 and Wang Y 1,2 1 Northeastern Unversty, Chna 2 Uppsala Unversty, Sweden Abstract Schedulng mxed-crtcalty
More informationChapter - 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