scheduling algorithm and analysis
play

Scheduling Algorithm and Analysis EDF (Module 28) Yann-Hang Lee - PowerPoint PPT Presentation

Scheduling Algorithm and Analysis EDF (Module 28) Yann-Hang Lee Arizona State University yhlee@asu.edu (480) 727-7507 Summer 2014 Real-time Systems Lab, Computer Science and Engineering, ASU Priority-Driven Scheduling of Periodic Tasks


  1. Scheduling Algorithm and Analysis EDF (Module 28) Yann-Hang Lee Arizona State University yhlee@asu.edu (480) 727-7507 Summer 2014 Real-time Systems Lab, Computer Science and Engineering, ASU

  2. Priority-Driven Scheduling of Periodic Tasks  Why priority-driven scheduling  use priority to represent urgency  easy implementation of scheduler (compare priorities and dispatch tasks)  tasks can be added or removed easily  no direct control of execution instance  How can we analyze the schedulability if we don’t know when a task is to be executed  Let’s begin a deterministic case in one processor  independent periodic tasks  deadline = period  preemptable  no overhead for context switch 1 Real-time Systems Lab, Computer Science and Engineering, ASU

  3. Priority-Driven Schedules  Assign priority when jobs arrive  static -- all jobs of a task have a fixed priority  dynamic -- different priorities to individual tasks of a task  relative priorities don’t change while jobs are waiting  Static priority schedules  Rate-monotonic -- the smaller a task period, the higher its priority  Deadline-monotonic – if deadline ≠ period, the smaller a task’s deadline (relative), the higher its priority  Dynamic priority schedules  EDF -- earliest deadline (absolute) first  Schedulable utilization:  a scheduling algorithm can feasibly schedule any sets of priority tasks if the total utilization is equal to or less than the schedulable utilization of the algorithm 2 Real-time Systems Lab, Computer Science and Engineering, ASU

  4. Earliest-deadline First (EDF) Schedule  Priority preemptive scheduling  a job with earliest (absolute) deadline has the highest priority  does not require the knowledge of execution time  Optimal if  single processor, no resource contention, preemption  why it is optimal: assume a feasible schedule J i J k (non-EDF) d k d i r k ( r k ) J k J k J i (EDF) d k d i 3 Real-time Systems Lab, Computer Science and Engineering, ASU

  5. Non-optimality of EDF  Non-preemptive or multiple processors  scheduling anomaly --- the schedule fails after we reduce job execution times D 1 D 2 D 3 T 1 T 2 T 3 Missed deadline idle ( all jobs meet their deadline under EDF after increasing e 1 ) 4 Real-time Systems Lab, Computer Science and Engineering, ASU

  6. EDF Schedule  A optimal algorithm under single processor and preemptable tasks  How do we know a set of periodic tasks are schedulable under EDF ?  If we know the schedulable utilization SU of EDF, then any sets of tasks are schedulable when U ≤ SU  Theorem: A set of n periodic tasks can be scheduled by EDF iff = ∑ n e ≤ i 1 U p = i 1 i  This schedulability utilization is no long true if deadline < period . 5 Real-time Systems Lab, Computer Science and Engineering, ASU

  7. Example of EDF Schedule  A digital robot with EDF schedule  control loop: e c ≤ 8ms at 100Hz  BIST: e b ≤ 50ms 8 50 + = + ≤  given u u 1 c b 10 p b  BIST can be done every 250ms  Add a telemetry task to send and receive messages with e t ≤ 15ms  if BIST is done every 1000ms  given 8 50 15 + = + + ≤ u u 1 c b 10 1000 D t  the telemetry task can have a relative deadline of 100ms  sending or receiving must be separated at least 100ms 6 Real-time Systems Lab, Computer Science and Engineering, ASU

  8. Supplementary Slides Real-time Systems Lab, Computer Science and Engineering, ASU

  9. On-line vs. Off-line Scheduling  Off-line scheduling: the schedule is computed off-line and is based on the knowledge of the release times and execution times of all jobs.  For deterministic systems: with fixed set of functions and job characteristics does not vary or vary only slightly.  On-line scheduling: a scheduler makes each scheduling decision without knowledge about the jobs that will be released in the future.  there is no optimal on-line schedule if jobs are non-preemptive  when a job is released, the system can serve it or wait for the future jobs J 2 J 1 ( should wait for J 2 ) r 2 D 1 r 1 D 2 J 3 J 1 ( should begin J 1 ) r 3 r 1 D 1 and D 3 8 Real-time Systems Lab, Computer Science and Engineering, ASU

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