Embedded Systems Exercise 3: Scheduling Real-Time Periodic and Mixed Task Sets 18. May 2005 Alexander Maxiaguine
Definitions: RT Periodic Tasks Arrival Time Deadline, Di t Period, Ti Execution Time, Ci
Some Assumptions Tasks are independent All instances of a periodic task have same worst-case execution time, Ci same relative deadline Di<Ti (often Di= Ti) … see lecture notes for the full list of assumptions
Scheduling Problems and Algorithms Criteria: Di= Ti vs. Di<Ti static vs. dynamic priority preemptive scheduling Algorithms for mixed task sets: Polling Server (static priority) Total Bandwidth Server (dynamic priority)
Rate Monotonic (RM) t t t t Static priority assignment rule: Assumption: Di= Ti Rate Monotonic (RM) Static priority assignment rule: Tasks with shorter period get higher priority High Low t T1 t T2 t T3 t
Deadline Monotonic (DM) Assumption: Di< Ti Deadline Monotonic (DM) Static priority assignment rule: Tasks with smaller relative deadline get higher priority High Low t T2 t T3 t T1 t
Deadline Monotonic (DM) Static priority assignment rule: Tasks with smaller relative deadline get higher priority High Low t T2 t T3 t T1 t
Scheduling Mixed Task Sets How should aperiodic requests be scheduled? Solutions: Polling Server (RM) Total Bandwidth Server (EDF)
RM - Polling Server Basic idea: Ts determines priority of aperiodic tasks RM - Polling Server Basic idea: Introduce an artificial periodic task --- the server for aperiodic requests
EDF – Total Bandwidth Server Basic idea: Dynamically assign deadlines to aperiodic tasks such that the server utilization factor Us (bandwidth) is never exceeded t
Schedulability Conditions Dynamic Priority EDF (Di= Ti) TB Server Static Priority RM (Di= Ti) DM Polling Server sufficient necessary & sufficient
Necessary and Sufficient Test Basic Idea: assume all tasks arrive at the same time (critical instant) for each task compute the worst-case interference from all higher priority tasks for each task check if true for all tasks the task set is schedulable Worst-case response time: