1 / 14

Periodic Task Scheduling

Periodic Task Scheduling. 張軒彬助理教授 中興大學資訊科學系. Outline. Processor Utilization Factor Rate Monotonic Scheduling Earliest Deadline First. Processor Utilization Factor.

donkor
Download Presentation

Periodic Task Scheduling

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Periodic Task Scheduling 張軒彬助理教授 中興大學資訊科學系

  2. Outline • Processor Utilization Factor • Rate Monotonic Scheduling • Earliest Deadline First

  3. Processor Utilization Factor • Given a set T of n periodic tasks, processor utilization factor U is the fraction of processor time spent in the execution of a task set • There exists a maximum value of U below which T is schedulable and above with T is not schedulable • Depend on the task set and used scheduling algorithm • Let Uub(T, A) denote the upper bound of the processor utilization factor for a task set T under a give algorithm A • If U = Uub(T, A), the set T is said to fully utilize the processor

  4. Processor Utilization Factor (Cont.) • For a given algorithm A, the least upper boundUlub(A) of the processor utilization factor is the minimum of the utilization factors over all task sets that fully utilize the processor Uub1 T1 Uub2 T2 Uub3 T3 Uub4 T4 Uubm Tm U 0 1 Ulub

  5. Processor Utilization Factor (Cont.) • Ulub(A) defines an important characteristics of a real-time scheduling algorithm. • It allow to easily verify the schedulability of a task set. • If a task set whose processor utilization factor is below Ulub(A), then it is schedulable by the algorithm A. • In contrast, if a task set’s processor utilization factor is above Ulub(A), it may or may not be schedulable by the algorithm A

  6. Rate Monotonic Scheduling • Task model: • Periodic tasks • Arbitrary arrival times • Different computation time and deadlines • Preemptive

  7. Rate Monotonic Scheduling (Cont.) • Rate Monotonic (RM) • Assign priorities to tasks according to their request rates • Tasks with higher request rates, i.e., shorter periods, have higher priorities • Fixed-priority scheduling algorithm • Priority are assigned to tasks before execution and do not change over time • Intrinsically preemptive • The currently executing task is preempted by a newly arrived task with shorter period

  8. Rate Monotonic Scheduling (Cont.) • Optimality: RM is optimal among all fixed-priority scheduling algorithms • No other fixed-priority algorithm can schedule a task set that cannot be scheduled by RM • Schedulability condition: given n tasks, the least upper bound of the processor utilization factor under RM is

  9. Rate Monotonic Scheduling (Cont.) • Concluding remarks • The schedulability condition is sufficient to guarantee the feasibility of any task set, but it is not necessary • Thus, if a task set has an utilization factor greater than Ulub and less than one, nothing can be said on the feasibility of the task set

  10. Earliest Deadline First • Earliest Deadline First (EDF) • Selects tasks according to their (absolute) deadlines • Tasks with earlier deadlines will be executed at higher priority • Dynamic scheduling algorithm • The absolute deadline of a periodic task depends on the current ith instances • Thus, EDF is a dynamic priority assignment • Intrinsically preemptive • The current executing task is preempted whenever another periodic instance with earlier deadline become active

  11. Earliest Deadline First (Cont.) • Optimality: • EDF is optimal among all dynamic-priority scheduling algorithms • Schedulability analysis • A set of periodic tasks is schedulable with EDF if and only if

  12. Example • Two tasks: • Task 1: execution time: 2, period: 5 • Task 2: execution time: 4, period: 7 • Processor utilization factor • U = 2/5 + 4/7 = 0.97 • U > Ulcb of RM • RM cannot guarantee schedulability • U < Ulcb(=1) of EDF • EDP thus guarantee schedulability

  13. Example RM T1 0 5 10 15 20 25 30 35 time overflow T2 0 7 14 21 28 35 EDF T1 0 5 10 15 20 25 30 35 T2 0 7 14 21 28 35

  14. Reference • Giorgio C. Buttazzo, “Hard Real-Time Computing Systems: Predictable Scheduling Algorithms and Applications,” Kluwer Academic Publishers, 1997 • Jane W. S. Liu, “Real-Time Systems,” Prentice Hall, 2002

More Related