Download presentation
Presentation is loading. Please wait.
Published byEthan Abner Foster Modified over 9 years ago
1
CprE 458/558: Real-Time Systems (G. Manimaran)1 CprE 458/558: Real-Time Systems Dynamic Planning Based Scheduling
2
CprE 458/558: Real-Time Systems (G. Manimaran)2 The big picture
3
CprE 458/558: Real-Time Systems (G. Manimaran)3 Planning based scheduling approach A planning based approach will evaluate different possible schedules for a given task set and chooses a final feasible schedule which satisfies all the constraints Ideally, one should evaluate all the possible schedules before choosing the final schedule. However, the number of possible schedules for a reasonable number of tasks is huge. Therefore, all the possible schedules in the search space cannot be evaluated
4
CprE 458/558: Real-Time Systems (G. Manimaran)4 Scheduler model
5
CprE 458/558: Real-Time Systems (G. Manimaran)5 Scheduler model (contd.) Schedulability checking (on-line) –by the scheduler Schedule construction (on-line) –by the scheduler Dispatching & Resource reclaiming –by the processors; each processor runs reclaiming algorithm when it finishes a task execution. Sched-check at a most opportune time (punctual point) –Too early: tend to reject tasks because reclaiming may not be exploited fully –Too late: if rejected, the application has no time to take any recovery action
6
CprE 458/558: Real-Time Systems (G. Manimaran)6 Task set model Planning based scheduler assumes worst case computation time for each task Planning based scheduler performs non- preemptive scheduling
7
CprE 458/558: Real-Time Systems (G. Manimaran)7 Planning based scheduling: search space The search space for the planning based scheduling consists of different possible schedules for the given task set A typical planning based scheduler will prune the search space by exploring different schedules and choose a final feasible schedule based on a heuristic function
8
CprE 458/558: Real-Time Systems (G. Manimaran)8 Search space: example Aperiodic Task set: T i = (r i, c i, d i ) T1 = (0,2,8) and T2 = (1,5,6) 2 76 T1T2 8 T1T2 176 8 0 Schedule #1 Schedule #2 Different possible schedules
9
CprE 458/558: Real-Time Systems (G. Manimaran)9 Spring/Myopic Scheduling Algorithm Notations/Jargon –EAT S K = earliest available time when resource R k becomes available for shared access –EAT e K = earliest available time when resource R k becomes available for exclusive access –Avail_time(j) = earliest time at which the processor P j becomes available for executing a task –EST(T i ) = Max(r i, min(avail_time(j)), max(EAT U K ) )
10
CprE 458/558: Real-Time Systems (G. Manimaran)10 Understanding EST: Example TxTx Time = 10 Time = 5 Time = 3 R1R1 P1P1 Arrival of tasks TiTi EST(Ti) = max(3, 5, 10) = 10
11
CprE 458/558: Real-Time Systems (G. Manimaran)11 Definitions Feasible task: –A task T i is feasible in a schedule if its timing constraint and resource requirements are met in the schedule, that is, if –EST(T i ) + C i ≤ D i. Feasible schedule: –A schedule for a set of tasks is said to be a feasible schedule if all the tasks are feasible in the schedule.
12
CprE 458/558: Real-Time Systems (G. Manimaran)12 Definitions (contd..) Strongly feasible schedule: –A partial schedule for a subset of tasks. A partial schedule is said to be strongly feasible if all the schedules obtained by extending the current schedule by any one of the remaining tasks within a window, called the feasibility check window K are also feasible.
13
CprE 458/558: Real-Time Systems (G. Manimaran)13 Spring/Myopic Scheduling Algorithm Heuristic search algorithm based on a notion of strong feasibility. Branch & Bound search. 1.Sort the “n” tasks in deadline order. 2.Check for strong feasibility for K tasks which are in the feasibility check window. (i.e., Check if EST(Ti) + Ci <= di) 3.If the current vertex is strongly feasible –Compute heuristic value Hi = di + W * EST(Ti) –Choose the best (smallest) H value, let it be Hx. –Extend the schedule with task Tx.
14
CprE 458/558: Real-Time Systems (G. Manimaran)14 Spring/Myopic Scheduling (contd.) 4. Else Backtrack to the previous vertex, Extend the schedule with next best task. 5.Repeat steps 2-4 until either: –Feasible schedule is obtained. –Maximum backtracks reached. –No more backtracking is possible. Algorithm Complexity: O(Kn + Backtracks). Exhaustive search algorithm: O(m^n) where m: # processors; n: # tasks.
15
CprE 458/558: Real-Time Systems (G. Manimaran)15 Myopic scheduling: Example Task IdReady timeWCETDeadlineR1 usageR2 usage T102880SN T202473NE T3143993EE T452589SN T53521108NS T2 T1T4T3T5 Feasibility check window, K = 3 Ordered by their deadlines Search Tree (0,0) (24,0) (24,28) (49,28) (88,28) (49,56) (95,56) T2 on P1 H2 = 73 + 0 H1 = 80 + 0 H4 = 89 + 5 Strongly feasible H1 = 80 + 0 H4 = 89 + 5 H3 = 93 + 24 T1 on P2 Strongly feasible H4 = 89 + 24 H3 = 93 + 28 H5 = 108 + 35 NOT Strongly feasible Strongly feasible T4 on P1 H3 = 93 + 49 H5 = 108 + 35 T5 on P2 T3 on P1 Strongly feasible T3 on P1 Strongly feasible Assume, w = 1
16
CprE 458/558: Real-Time Systems (G. Manimaran)16 Myopic scheduling: Example Search Tree (0,0) (24,0) (24,28) (49,28) (88,28) (49,56) (95,56) T2 on P1 T1 on P2 T4 on P1 T5 on P2 T3 on P1 P1 P2 T2 24 T1 28 T4 49 T5 3556 T3 9556 Feasible schedule obtained using Myopic algorithm
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.