Real Time Scheduling Algorithm
description
Transcript of Real Time Scheduling Algorithm
-
*Real-Time Scheduling
CIS 700
-
*OutlineReal-time systems
Real-time scheduling algorithmsFixed-priority algorithm (RM)Dynamic-priority algorithm (EDF)
-
*Real-Time WorkloadJob (unit of work)a computation, a file read, a message transmission, etcAttributesResources required to make progressTiming parametersReleased Absolute deadlineExecution time
-
*Real-Time TaskTask : a sequence of similar jobsPeriodic task (p,e)Its jobs repeat regularlyPeriod p = inter-release time (0 < p)Execution time e = maximum execution time (0 < e < p)Utilization U = e/p510150
-
*SchedulabilityProperty indicating whether a real-time system (a set of real-time tasks) can meet their deadlines(4,1)(5,2)(7,2)
-
*Real-Time SchedulingDetermines the order of real-time task executions Static-priority schedulingDynamic-priority scheduling(4,1)(5,2)(7,2)
-
*RM (Rate Monotonic)Optimal static-priority schedulingIt assigns priority according to periodA task with a shorter period has a higher priorityExecutes a job with the shortest period
(4,1)(5,2)(7,2)T1T2T3
-
*RM (Rate Monotonic)Executes a job with the shortest period(4,1)(5,2)(7,2)T1T2T3
-
*RM (Rate Monotonic)Executes a job with the shortest period(4,1)(5,2)(7,2)Deadline Miss !T1T2T3
-
*Response TimeResponse time Duration from released time to finish time(4,1)(5,2)(10,2)T1T2T3
-
*Response TimeResponse time Duration from released time to finish time
(4,1)(5,2)(10,2)Response TimeT1T2T3
-
*Response TimeResponse Time (ri) [Audsley et al., 1993]
HP(Ti) : a set of higher-priority tasks than Ti
(4,1)(5,2)(10,2)551010T1T2T3
-
*RM - Schedulability AnalysisReal-time system is schedulable under RM if and only if ri pi for all task Ti(pi,ei)
-
*RM Utilization BoundReal-time system is schedulable under RM if Ui n (21/n-1)
Liu & Layland, Scheduling algorithms for multi-programming in a hard-real-time environment, Journal of ACM, 1973.
-
*RM Utilization BoundReal-time system is schedulable under RM if Ui n (21/n-1)
Example: T1(4,1), T2(5,1), T3(10,1),
Ui = 1/4 + 1/5 + 1/10 = 0.55 3 (21/3-1) 0.78
Thus, {T1, T2, T3} is schedulable under RM.
-
*RM Utilization BoundReal-time system is schedulable under RM if Ui n (21/n-1)
Chart1
1
0.8284271247
0.75682846
0.7240618613
0.7083805188
0.7007087569
0.6969143073
0.6950273424
0.6940864129
0.6936165848
0.6933818297
0.6932644919
0.6932058329
The Number of Tasks
Utilization
RM Utilization Bounds
Sheet1
110
20.82842712471
40.756828462
80.72406186133
160.70838051884
320.70070875695
640.69691430736
1280.69502734247
2560.69408641298
5120.69361658489
10240.693381829710
20480.693264491911
40960.693205832912
13
Sheet1
0
0
0
0
0
0
0
0
0
0
0
0
0
The Number of Tasks
Utilization
RM Utilization Bounds
Sheet2
Sheet3
-
*EDF (Earliest Deadline First)Optimal dynamic priority schedulingA task with a shorter deadline has a higher priorityExecutes a job with the earliest deadline(4,1)(5,2)(7,2)T1T2T3
-
*EDF (Earliest Deadline First)Executes a job with the earliest deadline(4,1)(5,2)(7,2)T1T2T3
-
*EDF (Earliest Deadline First)Executes a job with the earliest deadline(4,1)(5,2)(7,2)T1T2T3
-
*EDF (Earliest Deadline First)Executes a job with the earliest deadline(4,1)(5,2)(7,2)T1T2T3
-
*EDF (Earliest Deadline First)Optimal scheduling algorithm if there is a schedule for a set of real-time tasks, EDF can schedule it.(4,1)(5,2)(7,2)T1T2T3
-
*Processor Demand BoundDemand Bound Function : dbf(t)the maximum processor demand by workload over any interval of length t
(4,1)(5,2)(7,2)tT1T2T3
-
*EDF Utilization BoundReal-time system is schedulable under EDF if and only if Ui 1
Liu & Layland, Scheduling algorithms for multi-programming in a hard-real-time environment, Journal of ACM, 1973.
-
*RM vs. EDFRate MonotonicSimpler implementation, even in systems without explicit support for timing constraints (periods, deadlines)Predictability for the highest priority tasks
EDFFull processor utilizationMisbehavior during overload conditions
*