announcement real time scheduling
play

Announcement Real-Time Scheduling Mid-term course evaluation will - PDF document

Announcement Real-Time Scheduling Mid-term course evaluation will be open till Whatre the optimal scheduling algorithms? March 26 th (Saturday) Can we meet all deadlines? Feedbacks are welcome! Chenyang Lu CSE 467S 1


  1. Announcement Real-Time Scheduling • Mid-term course evaluation will be open till • What’re the optimal scheduling algorithms? March 26 th (Saturday) • Can we meet all deadlines? • Feedbacks are welcome! Chenyang Lu CSE 467S 1 Chenyang Lu CSE 467S 2 Benefit of Scheduling Analysis Consequence of Deadline Miss VEST (UVA) Baseline (Boeing) Design – one processor 40 Design – one processor 25 • Hard deadline I mplementation – one processor 75 • System fails if missed. Scheduling analysis - MUF × Timing test × 1 30 Design - two processors 25 Design - two processors 90 • Goal: Guarantee no deadline miss. I mplementation – two processors 105 • Soft deadline Scheduling analysis - DM/ Offset √ Timing test √ 1 20 “I mplementation” 105 • User may notice, but system doesn’t necessarily fail. Total composition time 172 Total composition time 345 • Goal: Meet most deadlines most of the time. •Schedulability analysis reduces composition time by 50%! •Reduce wasted implementation/testing rounds •Analysis time <<< testing •More reduction expected for more complex systems → Quick exploration of design space! J.A. Stankovic, et. al., "VEST: An Aspect-Based Composition Tool for Real-Time Systems," RTAS 2003. Chenyang Lu CSE 467S 3 Chenyang Lu CSE 467S 4 Comparison Terminology • General-purpose systems • Task • e.g., PCs, database servers • May corresponds to a process or thread • Fairness to all tasks (no starvation) • May be released multiple times • Optimize throughput • Periodic task • Optimize average performance • Ideal: inter-arrival time = period • Embedded systems • General: inter-arrival time >= period • Meet all deadlines. • Aperiodic task • Fairness or throughput is not important • Inter-arrival time does not have a lower bound • Hard real-time: worry about worst case performance • Job: an instance of a task Chenyang Lu CSE 467S 5 Chenyang Lu CSE 467S 6

  2. Timing Parameters Metrics • Task T i • Schedulability • A task set is schedulable under a scheduling • Period P i algorithm if all jobs can meet their deadlines • Worst-case execution time C i • Overhead • Relative deadline D i • Time required for scheduling decision and context • Job J ik switches. • Release time: time when a job is ready • Response time R i = finish time – release time • Absolute deadline = release time + D i • A job misses its deadline if Chenyang Lu • Response time R i > D i CSE 467S 7 Chenyang Lu CSE 467S 8 Optimality Optimal Scheduling Algorithms A scheduling algorithm S is optimal if • Rate Monotonic Scheduling (RMS) • Higher rate (=1/period) � Higher priority • a task set is not schedulable under S � it is not • Optimal preemptive static priority scheduling algorithm schedulable under any other algorithms • Earliest Deadline First (EDF) • Earlier absolute deadline � Higher priority • Optimal preemptive dynamic priority scheduling algorithm Chenyang Lu CSE 467S 9 Chenyang Lu CSE 467S 10 Assumptions Utilization Bound • Single processor. • Utilization of a processor: • All tasks are periodic. = ∑ C • Zero context switch time. j U P • Relative deadline = period. ∈ T S j j • No blocking. where S is the set of tasks on the processor. • Utilization bound U b : All tasks are guaranteed • RMS and EDF have been extended to cases with relaxed assumptions to be schedulable if U ≤ U b Chenyang Lu CSE 467S 11 Chenyang Lu CSE 467S 12

  3. Necessary Condition RMS Utilization Bound • U b (n) = n(2 1/n -1) • No scheduling algorithm can schedule a task set if U > 1 • n: number of tasks • U b (2) = 0.828 • U b ≤ 1 • U b (n) ≥ U b ( ∞ ) = ln2 = 0.693 • An algorithm is optimal if its U b = 1 • U ≤ U b (n) is a sufficient condition, but not necessary in general cases. • U b = 1 if all process periods are harmonic, i.e., periods are multiples of each other • e.g., 1,10,100 Chenyang Lu CSE 467S 13 Chenyang Lu CSE 467S 14 RMS EDF Utilization Bound • U b = 1 • RMS may not guarantee schedulability even when CPU is not fully utilized • U ≤ 1 is a sufficient and necessary condition for schedulability. • Low overhead: When tasks are fixed, priorities are never changed Chenyang Lu CSE 467S 15 Chenyang Lu CSE 467S 16 EDF Assumptions • EDF can guarantee schedulability as long • Single processor. as CPU is not fully utilized • All tasks are periodic. • Higher overhead than RMS: Task • Zero context switch time. priorities may need to be changed online • Relative deadline = period. • No blocking. • What if relative deadline < period? Chenyang Lu CSE 467S 17 Chenyang Lu CSE 467S 18

  4. Deadline Monotonic Scheduling (DMS) Response Time Analysis • Shorter relative deadline � Higher priority • Assume fixed-priority scheduling • Optimal preemptive static priority scheduling • Critical instant when relative deadline < period • results in a task’s longest response time. • occurs when all higher-priority tasks are released at the same time as the task. Chenyang Lu CSE 467S 19 Chenyang Lu CSE 467S 20 Response Time Analysis /* Tasks are ordered by priority; T 1 has the highest priority */ for (each task T j ) { I = 0; R = 0; while (I + C i > R) { R = I + C j ; if (R > D j ) return UNSCHEDULABLE; ⎡ ⎤ R ∑ j-1 I= C ; ⎢ ⎥ k P k=1 ⎢ ⎥ k } return SCHEDULABLE; } Chenyang Lu CSE 467S 21

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend