Scheduling Periodic Real-Time Tasks on Uniprocessor Systems. LS 12, TU Dortmund

Similar documents
Schedulability of Periodic and Sporadic Task Sets on Uniprocessor Systems

Task Models and Scheduling

Static priority scheduling

Static-Priority Scheduling. CSCE 990: Real-Time Systems. Steve Goddard. Static-priority Scheduling

Multiprocessor Scheduling II: Global Scheduling. LS 12, TU Dortmund

Multiprocessor Scheduling I: Partitioned Scheduling. LS 12, TU Dortmund

Scheduling Algorithms for Multiprogramming in a Hard Realtime Environment

Real-Time Systems. LS 12, TU Dortmund

Schedulability and Optimization Analysis for Non-Preemptive Static Priority Scheduling Based on Task Utilization and Blocking Factors

Non-Preemptive and Limited Preemptive Scheduling. LS 12, TU Dortmund

Lecture 13. Real-Time Scheduling. Daniel Kästner AbsInt GmbH 2013

Aperiodic Task Scheduling

Real-time Systems: Scheduling Periodic Tasks

Real-Time and Embedded Systems (M) Lecture 5

EDF Scheduling. Giuseppe Lipari May 11, Scuola Superiore Sant Anna Pisa

Andrew Morton University of Waterloo Canada

Embedded Systems Development

Lecture 6. Real-Time Systems. Dynamic Priority Scheduling

Embedded Systems 15. REVIEW: Aperiodic scheduling. C i J i 0 a i s i f i d i

Real-Time Systems. Event-Driven Scheduling

EDF Scheduling. Giuseppe Lipari CRIStAL - Université de Lille 1. October 4, 2015

Non-Work-Conserving Non-Preemptive Scheduling: Motivations, Challenges, and Potential Solutions

A Note on Modeling Self-Suspending Time as Blocking Time in Real-Time Systems

Real-time Scheduling of Periodic Tasks (2) Advanced Operating Systems Lecture 3

Real-time Scheduling of Periodic Tasks (1) Advanced Operating Systems Lecture 2

Schedulability analysis of global Deadline-Monotonic scheduling

System Model. Real-Time systems. Giuseppe Lipari. Scuola Superiore Sant Anna Pisa -Italy

Real-Time Systems. Lecture #14. Risat Pathan. Department of Computer Science and Engineering Chalmers University of Technology

Real-Time Scheduling and Resource Management

Non-preemptive Fixed Priority Scheduling of Hard Real-Time Periodic Tasks

EDF Feasibility and Hardware Accelerators

Paper Presentation. Amo Guangmo Tong. University of Taxes at Dallas February 11, 2014

Real-Time Systems. Event-Driven Scheduling

Real-time scheduling of sporadic task systems when the number of distinct task types is small

Optimal Utilization Bounds for the Fixed-priority Scheduling of Periodic Task Systems on Identical Multiprocessors. Sanjoy K.

Priority-driven Scheduling of Periodic Tasks (1) Advanced Operating Systems (M) Lecture 4

2.1 Task and Scheduling Model. 2.2 Definitions and Schedulability Guarantees

Segment-Fixed Priority Scheduling for Self-Suspending Real-Time Tasks

Real-Time Scheduling. Real Time Operating Systems and Middleware. Luca Abeni

RUN-TIME EFFICIENT FEASIBILITY ANALYSIS OF UNI-PROCESSOR SYSTEMS WITH STATIC PRIORITIES

Clock-driven scheduling

arxiv: v3 [cs.ds] 23 Sep 2016

There are three priority driven approaches that we will look at

3. Scheduling issues. Common approaches 3. Common approaches 1. Preemption vs. non preemption. Common approaches 2. Further definitions

Exact speedup factors and sub-optimality for non-preemptive scheduling

A New Sufficient Feasibility Test for Asynchronous Real-Time Periodic Task Sets

arxiv: v1 [cs.os] 28 Feb 2018

CEC 450 Real-Time Systems

Embedded Systems 14. Overview of embedded systems design

Rate-monotonic scheduling on uniform multiprocessors

Bursty-Interference Analysis Techniques for. Analyzing Complex Real-Time Task Models

Multiprocessor Real-Time Scheduling Considering Concurrency and Urgency

Tardiness Bounds under Global EDF Scheduling on a Multiprocessor

Lecture: Workload Models (Advanced Topic)

Real-Time Scheduling

arxiv: v1 [cs.os] 21 May 2008

IN4343 Real Time Systems April 9th 2014, from 9:00 to 12:00

The Partitioned Dynamic-priority Scheduling of Sporadic Task Systems

Real-Time Calculus. LS 12, TU Dortmund

CIS 4930/6930: Principles of Cyber-Physical Systems

Deadline-driven scheduling

Dependency Graph Approach for Multiprocessor Real-Time Synchronization. TU Dortmund, Germany

A Theory of Rate-Based Execution. A Theory of Rate-Based Execution

Mitra Nasri* Morteza Mohaqeqi Gerhard Fohler

Semi-Partitioned Fixed-Priority Scheduling on Multiprocessors

Networked Embedded Systems WS 2016/17

Dynamic-Priority Scheduling. CSCE 990: Real-Time Systems. Steve Goddard. Dynamic-priority Scheduling

PASS: Priority Assignment of Real-Time Tasks with Dynamic Suspending Behavior under Fixed-Priority Scheduling

Fixed Priority Scheduling

Tardiness Bounds under Global EDF Scheduling on a. Multiprocessor

Online Scheduling Switch for Maintaining Data Freshness in Flexible Real-Time Systems

Complexity of Uniprocessor Scheduling Analysis

Real-Time Systems. Lecture 4. Scheduling basics. Task scheduling - basic taxonomy Basic scheduling techniques Static cyclic scheduling

Mixed Criticality in Safety-Critical Systems. LS 12, TU Dortmund

AS computer hardware technology advances, both

DESH: overhead reduction algorithms for deferrable scheduling

EECS 571 Principles of Real-Time Embedded Systems. Lecture Note #7: More on Uniprocessor Scheduling

An Improved Schedulability Test for Uniprocessor. Periodic Task Systems

Real-Time Workload Models with Efficient Analysis

EDF and RM Multiprocessor Scheduling Algorithms: Survey and Performance Evaluation

On the Soft Real-Time Optimality of Global EDF on Multiprocessors: From Identical to Uniform Heterogeneous

Bounding the End-to-End Response Times of Tasks in a Distributed. Real-Time System Using the Direct Synchronization Protocol.

On-line scheduling of periodic tasks in RT OS

Schedulability Analysis of the Linux Push and Pull Scheduler with Arbitrary Processor Affinities

Controlling Preemption for Better Schedulability in Multi-Core Systems

Uniprocessor real-time scheduling

On Non-Preemptive Scheduling of Periodic and Sporadic Tasks

Load Regulating Algorithm for Static-Priority Task Scheduling on Multiprocessors

Laxity dynamics and LLF schedulability analysis on multiprocessor platforms

Exam Spring Embedded Systems. Prof. L. Thiele

Predictability of Least Laxity First Scheduling Algorithm on Multiprocessor Real-Time Systems

Bounding the Maximum Length of Non-Preemptive Regions Under Fixed Priority Scheduling

Task assignment in heterogeneous multiprocessor platforms

Non-Work-Conserving Scheduling of Non-Preemptive Hard Real-Time Tasks Based on Fixed Priorities

Partitioned scheduling of sporadic task systems: an ILP-based approach

arxiv: v1 [cs.os] 25 May 2011

Multi-core Real-Time Scheduling for Generalized Parallel Task Models

CPU SCHEDULING RONG ZHENG

Supplement of Improvement of Real-Time Multi-Core Schedulability with Forced Non- Preemption

The Feasibility Analysis of Multiprocessor Real-Time Systems

Transcription:

Scheduling Periodic Real-Time Tasks on Uniprocessor Systems Prof. Dr. Jian-Jia Chen LS 12, TU Dortmund 08, Dec., 2015 Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 1 / 38

Periodic Control System Pseudo-code for this system Control System set timer to interrupt periodically with period T ; A/D yk Control law computation uk D/A at each timer interrupt do perform analog-to-digital conversion to get y; y(t) sensor plant (The system being controlled) u(t) actuator compute control output u; output u and do digital-to-analog conversion; od Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 2 / 38

Example: Sporadic Control System Pseudo-code for this system Control System while (true) start := get the system tick; perform analog-to-digital conversion to get y; compute control output u; A/D y(t) sensor yk Control law computation plant (The system being controlled) uk D/A u(t) actuator output u and do digital-to-analog conversion; end := get the system tick; timetosleep := T (end start); sleep timetosleep; end while Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 3 / 38

Periodic and Sporadic Task Models When jobs (usually with the same computation requirement) are released recurrently, these jobs can be modeled by a recurrent task Periodic Task τ i : A job is released exactly and periodically by a period T i A phase φ i indicates when the first job is released A relative deadline D i for each job from task τ i (φ i, C i, T i, D i ) is the specification of periodic task τ i, where C i is the worst-case execution time. When φ i is omitted, we assume φ i is 0. Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 4 / 38

Periodic and Sporadic Task Models When jobs (usually with the same computation requirement) are released recurrently, these jobs can be modeled by a recurrent task Periodic Task τ i : A job is released exactly and periodically by a period T i A phase φ i indicates when the first job is released A relative deadline D i for each job from task τ i (φ i, C i, T i, D i ) is the specification of periodic task τ i, where C i is the worst-case execution time. When φ i is omitted, we assume φ i is 0. Sporadic Task τ i : T i is the minimal time between any two consecutive job releases A relative deadline D i for each job from task τ i (C i, T i, D i ) is the specification of sporadic task τ i, where C i is the worst-case execution time. Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 4 / 38

Examples of Recurrent Task Models Periodic task: (φ i, C i, T i, D i ) = (2, 2, 6, 6) release deadline J 1 J 1 J 1 J 1 J 1 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 Sporadic task: (C i, T i, D i ) = (2, 6, 6) J 1 J 1 J 1 J 1 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 5 / 38

Relative Deadline <=> Period For a task set, we say that the task set is with implicit deadline when the relative deadline D i is equal to the period T i, i.e., D i = T i, for every task τ i, constrained deadline when the relative deadline D i is no more than the period T i, i.e., D i T i, for every task τ i, or arbitrary deadline when the relative deadline D i could be larger than the period T i for some task τ i. The response time of a job is its finishing time minus its arrival time. The worst-case response time of task τ i is the maximum response time among the jobs of task τ i. Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 6 / 38

Some Definitions for Sporadic/Periodic Tasks Periodic Tasks: Synchronous system: Each task has a phase of 0. Asynchronous system: Phases are arbitrary. Hyperperiod: Least common multiple (LCM) of T i. Task utilization of task τ i : U i := C i T i. System (total) utilization: U(T ) := τ i T U i. Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 7 / 38

Outline Schedulability for Dynamic-Priority Scheduling Schedulability for Static-Priority (or Fixed-Priority) Scheduling Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 8 / 38

Utilization-Based Test for EDF Scheduling Theorem Liu and Layland: A task set T of n independent, preemptable, periodic tasks with implicit deadlines can be feasibly scheduled (under EDF) on one processor if and only if its total utilization U is at most one. Proof The only if part is obvious: If U > 1, then some task clearly must miss a deadline. So, we concentrate on the if part. Contrapositive: if T is not schedulable, then U > 1. Let J i,k be the first job to miss its deadline Let d i,k be the absolute deadline of J i,k Let t 1 be the last instant before d i,k, at which the processor is either idle or executing a job with absolute deadline larger than d i,k (cont.) Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 9 / 38

Proof of Utilization-Bound Test for EDF Proof. Because J i,k missed its deadline, we know that d i,k t 1 < demand in [t 1, d i,k ) by jobs with absolute deadline no more than d i,k n di,k t 1 = C j j=1 n j=1 T j d i,k t 1 C j T j By cancelling d i,k t 1, we conclude the proof by 1 < n j=1 C j T j = U. Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 10 / 38

Relative Deadlines Less than Periods Theorem A task set T of n independent, preemptable, periodic tasks with constrained deadlines can be feasibly scheduled (under EDF) on one processor if n C k min{d k, T k } 1. k=1 This theorem only gives a sufficient schedulability test. Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 11 / 38

Outline Schedulability for Dynamic-Priority Scheduling Schedulability for Static-Priority (or Fixed-Priority) Scheduling Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 12 / 38

Static-Priority (or Fixed-Priority) Scheduling Different jobs of a task are assigned the same priority. Note: we will assume that no two tasks have the same priority. We will implicitly index tasks in decreasing priority order, i.e., τ i has higher priority than τ k if i < k. Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 13 / 38

Static-Priority (or Fixed-Priority) Scheduling Different jobs of a task are assigned the same priority. Note: we will assume that no two tasks have the same priority. We will implicitly index tasks in decreasing priority order, i.e., τ i has higher priority than τ k if i < k. Which strategy is better or the best? largest execution time first? shortest job first? least-utilization first? most importance first? least period first? Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 13 / 38

Rate-Monotonic (RM) Scheduling (Liu and Layland, 1973) Priority Definition: A task with a smaller period has higher priority, in which ties are broken arbitrarily. Example Schedule: τ 1 = (1, 6, 6), τ 2 = (2, 8, 8), τ 3 = (4, 12, 12). [(C i, T i, D i )] τ 1 τ 1 τ 1 τ 1 τ 1 0 2 4 6 8 10 12 14 16 18 20 22 24 τ 2 τ 2 τ 2 τ 2 0 2 4 6 8 10 12 14 16 18 20 22 24 τ 3 τ 3 τ 3 τ 3 τ 3 0 2 4 6 8 10 12 14 16 18 20 22 24 Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 14 / 38

Deadline-Monotonic (DM) Scheduling (Leung and Whitehead) Priority Definition: A task with a smaller relative deadline has higher priority, in which ties are broken arbitrarily. Example Schedule: τ 1 = (2, 8, 4), τ 2 = (1, 6, 6), τ 3 = (4, 12, 12). [(C i, T i, D i )] τ 1 τ 1 τ 1 τ 1 0 2 4 6 8 10 12 14 16 18 20 22 24 τ 2 τ 2 τ 2 τ 2 τ 2 0 2 4 6 8 10 12 14 16 18 20 22 24 τ 3 τ 3 τ 3 τ 3 τ 3 0 2 4 6 8 10 12 14 16 18 20 22 24 Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 15 / 38

Optimality (or not) of RM and DM Example Schedule: τ 1 = (2, 4, 4), τ 2 = (5, 10, 10) τ 1 τ 1 τ 1 τ 1 τ 1 τ 1 0 2 4 6 8 10 12 14 16 18 20 τ 2 τ 2 τ 2 τ 2 τ 2 0 2 4 6 8 10 12 14 16 18 20 The above system is schedulable. Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 16 / 38

Optimality (or not) of RM and DM Example Schedule: τ 1 = (2, 4, 4), τ 2 = (5, 10, 10) τ 1 τ 1 τ 1 τ 1 τ 1 τ 1 0 2 4 6 8 10 12 14 16 18 20 τ 2 τ 2 τ 2 τ 2 τ 2 0 2 4 6 8 10 12 14 16 18 20 The above system is schedulable. No static-priority scheme is optimal for scheduling periodic tasks: However, a deadline will be missed, regardless of how we choose to (statically) prioritize τ 1 and τ 2. Corollary Neither RM nor DM is optimal. Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 16 / 38

τ 4 t Properties of Worst-Case Response Time Suppose that we are analyzing the worst-case response time of task τ i. Let us assume that the n 1 tasks are already verified to meet their deadlines. τ 1 τ 2 τ 3 Suppose t is the arrival time of a job of task τ i. A higher priority task τ j may release a job before t and this job is executed after t. Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 17 / 38

Properties of Worst-Case Response Time (cont.) Let t j be the arrival time of the first job of task τ j after or at time t. t j t. The remaining execution time of the job of task τ j arrived before t and unfinished at time t is at most C j. Since fixed-priority scheduling greedily executes an available job, the system remains busy from t till the time instant f at which task τ n finishes the job arrived at time t. That is, i 1 i 1 { t t tj < t < f, C i + C j + max j=1 As a result, (t t is replaced by t) j=1 i 1 i 1 t 0 < t < f t tj, C i + C j + j=1 j=1 T j T j } C j, 0 > t. C j > t. Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 18 / 38

Properties of Worst-Case Response Time (cont.) The minimum t such that i 1 i 1 t tj 0 < t T i, C i + C j + j=1 j=1 T j C j = t. is a safe upper bound on the worst-case response time of task τ i. Why do we need to constrain t T i? Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 19 / 38

Aside: Critical Instants Definition The critical instant of a task τ i is a time instant such that: 1 the job of τ i released at this instant has the maximum response time of all jobs in τ i, if the response time of every job of τ i is at most T i, the period of τ i, and 2 the response time of the job released at this instant is greater than T i if the response time of some job in τ i exceeds T i. Informally, a critical instant of τ i represents a worst-case scenario from τ i s standpoint when we use static-priority scheduling. Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 20 / 38

Critical Instants in Static-Priority Systems Theorem [Liu and Layland, JACM 1973] The critical instance of task τ i for a set of independent, preemptable periodic tasks with implicit deadlines is to release the first jobs of all the higher-priority tasks at the same time. We are not saying that τ 1,..., τ i will all necessarily release their first jobs at the same time, but if this does happen, we are claiming that the time of release will be a critical instant for task τ i. Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 21 / 38

Critical Instants: Informal Proof τ 1 τ 2 τ 3 τ 4 t 1 t t R Shifting the release time of tasks together will increase the response time of task τ i. Consider a job of τ i, released at time t, with completion time t R. Let t 1 be the latest idle instant for τ 1,..., τ i 1 at or before t R. Let J be τ i s job released at t. Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 22 / 38

Critical Instants: Informal Proof τ 1 τ 2 τ 3 τ 4 t 1 t t R We will show that shifting the release time of tasks together will increase the response time of task τ i. Moving J from t to t 1 does not decrease the completion time of J. Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 23 / 38

Critical Instants: Informal Proof τ 1 τ 2 τ 3 τ 4 t 1 t t R We will show that shifting the release time of tasks together will increase the response time of task τ i. Releasing τ 1 at t 1 does not decrease the completion time of J. Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 24 / 38

Critical Instants: Informal Proof τ 1 τ 2 τ 3 τ 4 t 1 t t R We will show that shifting the release time of tasks together will increase the response time of task τ i. Releasing τ 2 at t 1 does not decrease the completion time of J. Repeating the above movement and proves the criticality of the critical instant Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 25 / 38

Necessary and Sufficient (Exact) RM-Schedulability Time-demand analysis (TDA) TDA can be applied to produce a schedulability test for any fixed-priority algorithm that ensures that each job of every task completes before the next job of that task is released. For some important task models and scheduling algorithms, this schedulability test will be necessary and sufficient. Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 26 / 38

Schedulability Condition According to the critical instant theorem, to test the schedulability of task τ i, we have to 1 release all the higher-priority tasks at time 0 together with task τ i 2 release all the higher-priority task instances as early as they can We can simply simulate the above behavior to verify whether task τ i misses the deadline. Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 27 / 38

Schedulability Test The time-demand function W i (t) of the task τ i is defined as follows: i 1 t W i (t) = C i + C j. Theorem A system T of periodic, independent, preemptable tasks is schedulable on one processor by algorithm A if j=1 T j τ i T t with 0 < t D i and W i (t) t holds. This condition is also necessary for synchronous, periodic task systems and also sporadic task sets. Note that this holds for implicit-deadline and constrained-deadline task sets. The sufficient condition can be proved by contradiction. Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 28 / 38

How to Use TDA? The theorem of TDA might look strong as it requires to check all the time t with 0 < t D i for a given τ i. There are two ways to avoid this: Iterate using t(k + 1) := W i (t(k)), starting with t(0) := i j=1 C j, and stopping when, for some l, t(l) = W i (t(l)) or t(l) > D i. Only consider t {lt j ɛ 1 j i, l N + }, where ɛ is a constant close to 0. That is, only consider t at which a job of higher-priority tasks arrives. Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 29 / 38

Optimality Among Static-Priority Algorithms Theorem A system T of n independent, preemptable, synchronous periodic tasks with implicit deadlines can be feasibly scheduled on one processor according to the RM algorithm whenever it can be feasibly scheduled according to any static priority algorithm. The proof is omitted. It can be proved by using the critical instant theorem and the TDA analysis. Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 30 / 38

Harmonic Real-Time Systems Definition A system of periodic tasks is said with harmonic periods (also: simply periodic) if for every pair of tasks τ i and τ k in the system where T i < T k, T k is an integer multiple of T i. For example: Periods are 2, 6, 12, 24. Theorem [Kuo and Mok]: A system T of harmonic, independent, preemptable, and implicit-deadline tasks is schedulable on one processor according to the RM algorithm if and only if its total utilization U(T ) = τ j T C j T j is less than or equal to 1. Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 31 / 38

Proof for Harmonic Systems The case for the only-if part is skipped. τ 1 τ 2 τ 3 By using the contrapositive proof approach, suppose that T is not schedulable and τ i misses its deadline. We will prove that the utilization must be larger than 1. The response time of τ i is larger than D i. By critical instants, releasing all the tasks τ 1, τ 2,..., τ i at time 0 will lead to a response time of τ i larger than D i. Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 32 / 38

Proof for Harmonic Systems (cont.) As the schedule is workload-conserving, we know that from time 0 to time D i, the whole system is executing jobs. Therefore, D i < the workload released in time interval [0, D i ) i = C j ( the number of job releases of τ j in time interval [0, D i )) = j=1 i C j j=1 Di T j i = C j Di, T j j=1 where = is because D i = T i is an integer multiple of T j when j i. Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 33 / 38

Proof for Harmonic Systems (cont.) As the schedule is workload-conserving, we know that from time 0 to time D i, the whole system is executing jobs. Therefore, D i < the workload released in time interval [0, D i ) i = C j ( the number of job releases of τ j in time interval [0, D i )) = j=1 i C j j=1 Di T j i = C j Di, T j j=1 where = is because D i = T i is an integer multiple of T j when j i. By canceling D i, we reach the contradiction by having i C j 1 < C j. T j T j τ j T j=1 Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 33 / 38

Utilization-Based Schedulability Test Task utilization: U i := C i. T i System (total) utilization: U(T ) := τ i T C i T i. A task system T fully utilizes the processor under scheduling algorithm A if any increase in execution time (of any task) causes A to miss a deadline. In this case, U(T ) is an upper bound on utilization for A, denoted U ub (T, A). U lub (A) is the least upper bound for algorithm A: U lub (A) = min T U ub(t, A) Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 34 / 38

What is U lub (A) for? T 1 U ub (T 1, A) T 2 U ub (T 2, A) T 3 U ub (T 3, A) T 4 U ub (T 4, A) T 5 U ub (T 5, A)... T? U ub (T?, A) 0 U lub (A) 1 Feasible Unsure Infeasible Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 35 / 38

Liu and Layland Bound Theorem [Liu and Layland] A set of n independent, preemptable periodic tasks with implicit deadlines can be scheduled on a processor according to the RM algorithm if its total utilization U is at most n(2 1 n 1). In other words, U lub (RM, n) = n(2 1 n 1) 0.693. n U lub (RM, n) n U lub (RM, n) 2 0.828 3 0.779 4 0.756 5 0.743 6 0.734 7 0.728 8 0.724 9 0.720 10 0.717 0.693 = ln2 Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 36 / 38

Least Upper Bound Least Upper Bound 0.84 0.82 0.8 0.78 0.76 0.74 0.72 0.7 0.68 0.66 RM Bound 10 20 30 40 50 60 70 80 90 100 n Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 37 / 38

Comparison between RM and EDF (Implicit Deadlines) RM Low run-time overhead:o(1) with priority sorting in advance Optimal for static-priority Schedulability test is N P-hard (even if the relative deadline = period) Least upper bound: 0.693 In general, more preemption EDF High run-time overhead:o(log n) with balanced binary tree Optimal for dynamic-priority Schedulability test is easy (when the relative deadline = period) Least upper bound: 1 In general, less preemption Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 38 / 38