# paper discussion

Post on 23-Feb-2016

35 views

Embed Size (px)

DESCRIPTION

C. L. Liu and James W. Layland , "Scheduling Algorithms for M u ltiprogramming in a Hard-Real-Time Environment", JACM, Vol 20, No. 1, pp. 46--61, 1973 - PowerPoint PPT PresentationTRANSCRIPT

General

Paper DiscussionC. L. Liu and James W. Layland, "Scheduling Algorithms for Multiprogramming in a Hard-Real-Time Environment", JACM, Vol 20, No. 1, pp. 46--61, 1973 Chihg-Chih Han, Kwei-Jay Lin and Chao-Ju Hou, "Distance-Constrained Scheduling and Its Applications to Real-Time Systems", IEEE Trans. on Computers, Vol 45, No. 7, pp. 814-826 1996

/521 NEWSScheduling Algorithms for Multiprogramming in a Hard-Real-Time EnvironmentNo non-time-critical jobsPure Process Control/522C. L. Liu and James W. Layland, "Scheduling Algorithms for Multiprogramming in a Hard-Real-Time Environment", JACM, Vol 20, No. 1, pp. 46--61, 1973 NEWSAssumptions(A1) The requests for all tasks for which hard deadlines exist are periodic, with constant interval between requests.(A2) Deadlines consist of run-ability constraints only--i.e, each task must be completed before the next request for it occurs.(A3) The tasks are independent in that requests for a certain task do not depend on the initiation or the completion of requests for other tasks.(A4) Run-time for each task is constant for that task and does not vary with time. Run-time here refers to the time which is taken by a processor to execute the task without interruption.(A5) Any nonperiodic tasks in the system are special; they are initialization or failure-recovery routines; they displace periodic tasks while they themselves are being run, and do not themselves have hard, critical deadlines./523 NEWSReal-Time Task ModelPeriodic Task Modelparameters are known a priori

worst-case execution timeperiodrequest time ready timedeadlinestartfinishpreemptresumePredictability vs. Schedulabilityhigh predictability and schedulabilityeasy-to-check schedulability condition/524 NEWSTime-Driven Scheduling Approachwidely used inflexible, efficientlarge space needede.g. cyclic executivePriority-Driven Scheduling Approachdynamic-priority e.g. earliest deadline first fixed-priority e.g. rate monotonic

Scheduling Approaches/525 NEWSTerms in Schedulingjob: an instance of a taskdeadline: next request time of the same taskoverflow at time t: t is a deadline of unfulfilled requestfeasible: scheduled with no overflow (schedulable)response time: time span from request to finishcritical instance: an instance when a request will have the largest response timecritical time zone: time interval from a critical instance to its finish time/526 NEWS

A Fixed Priority Scheduling AlgorithmTHEOREM 1. A critical instant for any task occurs whenever the task is requested simultaneously with requests for all higher priority tasks.

A scheduling algorithm is feasible if all tasks can be fulfilled at their critical instants.

/527 NEWSA Fixed Priority Scheduling Algorithm (cont.)THEOREM 2. If a feasible priority assignment exists for some task set, the rate-monotonic priority assignment is feasible for that task set.

/528 NEWSOptimalityTHEOREM 2. If a feasible priority assignment exists for some task set, the rate-monotonic priority assignment is feasible for that task set.

/529 NEWSA Fixed Priority Scheduling Algorithm (cont.)THEOREM 3. For a set of two tasks with fixed priority assignment, the least upper bound to the processor utilization factor is U = 2 (2 - 1).case 1

case 2

T1T2T1T2/5210 NEWSA Fixed Priority Scheduling Algorithm (cont.)The minimum U occurs at the boundary of two casesT1T2T1T2

/5211 NEWS2011/3/3011Least Upper BoundAn easy-to-check schedulability condition

1

n=2, 0.83n=3, 0.78n=, 0.69

/5212 NEWSA Fixed Priority Scheduling Algorithm (cont.)THEOREM 4. For a set of m tasks with fixed priority order, and the restriction that the ratio between any two request periods is less than 2, the least upper bound to the processor utilization factor is U = m(2 1/m - 1).find optimal conditionswhen optimality exists or if it is optimal and condition A does not hold conflicts, so A must be true.solve equations at optimal conditionderive boundrelax assumption

/5213 NEWS

/5214T1T2T1T2T1T2T1T2 NEWS/5215

NEWSA Fixed Priority Scheduling Algorithm (cont.)THEOREM 5. For a set of m tasks with fixed priority order, the least upper bound to processor utilization is U = m(2 1/m - 1). The bound of special case is tighter than general case.Rate Monotonic Priority AssignmentThe smaller the period, the higher the priority.Rate Monotonic Scheduling Algorithmgenerate the whole scheduleon-lineoff-linepriority queue100%?/5216

NEWSA Deadline Driven Scheduling Algorithm THEOREM 6. When the deadline driven scheduling algorithm is used to schedule a set of tasks on a processor, there is no processor idle time prior to an overflow.

/5217 NEWS

A Deadline-Driven Scheduling Algorithm (cont.) THEOREM 7. For a given set of m tasks, the deadline driven scheduling algorithm is feasible if and only if U 1.necessary condition (only if)if feasible, the computation demand processor timesufficient conditionif U 1, and not feasiblecase 10 T T1 T2Tmall bi beyond T

/5218 NEWS2011/3/3018a deadline at Tb deadline beyond TSufficient Condition (cont.)

case 2some bi were carried out before T

/5219 NEWSA mixed Scheduling Algorithm?/5220 NEWS/52video serverinter-frame distance must be less than 33msrobot arm movementneeds steady and smooth operationssatellite/cellular phone trackingservice in constant time intervalmore predictable inter-execution time than the periodic task(PT) modelworst inter-execution time for PT is 2xperiod-ei

Distance-Constrained Task Model21Chihg-Chih Han, Kwei-Jay Lin and Chao-Ju Hou, "Distance-Constrained Scheduling and Its Applications to Real-Time Systems", IEEE Trans. on Computers, Vol 45, No. 7, pp. 814-826, 1996 NEWSPinwheel ProblemGiven a multiset A={a1, a2, ... ,an}, ai NFind an infinite sequence of symbols from {1, 2, ... , n} such that at least one symbol i within any interval of ai symbolsA={2,3} 1 2 1 2 1 2 ... 1 1 2 1 1 2 ...A unit-time schedule/5222 NEWS2011/3/3022Pinwheel schedule 0 1 2 3 4 5 6 7 8 9 10 11 120145678910113212T1 (1,6)

T2 (3,6)

T4 (2,12)

T3 (2,12)

6T2

T4

T1

T1

T3

T2

666666Pinwheel Schedule/5223 NEWSPinwheel TransformationPinwheelany numbers multiplesjitterless, predictable

Signalanalog digitalnoiseless, ease of controle.g. CD music

2E.g. A={3,4,6,13} {3} B ={3,3,6,12} ={3,3,321, 322} single-number reduction 3069AB12(RM)(PW)/5224 NEWSPinwheel Scheduling PropertiesGood jitter control in schedulesEasy-to-check schedulabilityPredictable resource accessesEasy extension for aperiodic tasksPredictable end-to-end delayNetwork scheduling (INFOCOM95 by Han & Shin)Flexible time-driven approach

/5225 NEWSPinwheel SchedulerGiven a multi-set of distance constraints of n tasksA={a1, a2, ... ,an}, density r(A) = Si (1/ai )Find another B={b1, b2, ... ,bn}, "i, bi ai ,A is schedulable if B is schedulable.If bis are multiples (bi|bj) and r(B) 1, B is schedulable.E.g. A={3,4,6,7} (specialized) B ={3,3,6,6}schedule is 1 2 3 1 2 4 1 2 3 1 2 4 ...The goal is to minimize density increase/5226 NEWS2011/3/3026Previous WorksSa:x=a1 , dSa 0.5Sx: a1 /2 < x a1 , dSx 0.65S23:use 2 and 3, dS23 7/12 @ 0.58Sbc: b=a1 , b c < 2bdSbc 2/3 @ 0.67CX: the set of all instances schedulable by Scheduler xCS23CSxCSaCSbcdX: the schedulable density bound for Scheduler x27 NEWSSingle-node Pinwheel SchedulingEarlier work: use a base of 2 , find x in (a1/2 , a1] Sa, Sx, Sbc, Sby, Sxy: 0.5, 0.65, 2/3, distance constraints of integer, unit execution timeSr: use a base of 2 , find r in (a1/2 , a1] real-number distance constraints and execution times

Our contributions:Srg: use a base of gSrb: try all bases (optimal for single-number reduction)HSr: near-optimal polynomial-time heuristicInteger Pinwheel Scheduling: Sxg, Sxb , HSx/5228 NEWS2011/3/3028Various Pinwheel Schedulers

/5229 NEWSMultiple-Node SchedulingAll nodes are specialized with the same base using DSr (Distributed Sr Scheduling)Pinwheel phase alignmentMinimize the total end-to-end delayMinimize the maximum end-to-end delay Pinwheelj

Pinwheel1

Pinwheel2

Pinwheelm

...

Nodej

N1

N2

Nm

...

...

/5230 NEWSa = {(1,2),(1,3)}b = {(1,2.1),(2.1,6)}c = {(1,1.9),(1,4)}d = {(1,2),(2.1,6)}e = {(1,1.9),(2.1,6)}f = {(1,2),(1.1,3)} : JitterlessRelationships of Pinwheel SchedulersCX: the set of all instances schedulable by Scheduler xCSrbCSxCSrCSxba.b.e.d.c.f./5231 NEWSSynchronous SchedulingIntranode: pinwheel scheduling makes task executions regular and predictable, i.e. no jitter.Internode: in all nodes, transform the periods of all tasks to harmonic numbers so that tasks of the same period are synchronized. The worst case delay for a task between its arrival and the beginning of its execution on a node is one period. Nodej

N1

N2

Nm

...

...

/5232 NEWS2011/3/3032

/5233 NEWS

/5234 NEWSSimplification

/5235 NEWSStudy of Pinwheel Schedulingn tasks are schedulable on a node (using HSr) if the total utilization is n (21/n - 1). n tasks are schedulable on all nodes (using DSr) if the utilization on any node is 21/n-1.Algorithm of O(n log n + nl) to minimize the total or maximum task delay between two nodes with l different periods. Algorithm of O(mn log n + mnl) to minimize the total end-to-end delay on m nodes.Polynomial heuristics to reduce the maximum end-to-end delay on m nodes./5236 NEWS2011/3/3036Time-driven Scheduling ApproachOff-lineconstruct

Recommended