Download presentation
Presentation is loading. Please wait.
Published byChad Chambers Modified over 9 years ago
1
KUKUM Real Time System 1/21 Module 2 Real Time System Scheduling Lecture 05
2
KUKUM Real Time System 2/21 Lecture Outline Fixed-priority scheduling –Optimality of RM and DM –General schedulability tests and time demand analysis Practical factors –Non-preemptable regions –Self-suspension –Context switches –Limited priority levels
3
KUKUM Real Time System 3/21 Optimality of RM and DM Algorithms In the general case RM and DM algorithms are not optimal –Some systems cannot be scheduled (U RM < 1) –Complex expressions for maximum schedulable utilization discussed in last lecture However, RM and DM are optimal in simply periodic systems –A system of periodic tasks is simply periodic if the period of each task is an integer multiple of the period of the other tasks: pk = n ⋅ pi –where pi < pk and n is a positive integer; for all Ti and Tk –This is true for many real-world systems
4
KUKUM Real Time System 4/21 Optimality of RM and DM Algorithms Theorem: A system of simply periodic, independent, preemptable tasks with Di≥pi is schedulable on one processor using the RM algorithm if and only if U ≤ 1 –Corollary: The same is true for the DM algorithm
5
KUKUM Real Time System 5/21 Schedulability of Fixed-Priority Tasks We have identified several simple schedulability tests for fixed priority scheduling: –A system of n independent preemptable periodic tasks with Di = pi can be feasibly scheduled on one processor using RM if and only if U ≤ n ⋅ (21/n – 1) –A system of simply periodic independent preemptable tasks with Di ≥ pi is schedulable on one processor using the RM algorithm if and only if U ≤ 1 –[similar results for DM] But: there are algorithms and regions of operation where we don’t have a schedulability test and must resort to exhaustive simulation –Is there a more general schedulability test? Yes, but not as simple as those we’ve seen so far…
6
KUKUM Real Time System 6/21 Schedulability Test for Fixed- Priority Tasks Fixed priority algorithms are predictable and do not suffer from scheduling anomalies –The worst case execution time of the system occurs with the worst case execution time of the jobs –Unlike dynamic priority algorithms, which can exhibit anomalous behaviour Use this as the basis for a general schedulability test: 1.Find the critical instant when the system is most loaded, and has its worst response time 2.Use time demand analysis to determine if the system is schedulable at that instant 3.Prove that, if a fixed-priority system is schedulable at the critical instant, it is always schedulable
7
KUKUM Real Time System 7/21 1.Finding the Critical Instant
8
KUKUM Real Time System 8/21 Finding the Critical Instant
9
KUKUM Real Time System 9/21
10
KUKUM Real Time System 10/21 Using the Critical Instant Having determined the critical instants, show that for each job Ji,c released at a critical instant, that job and all higher priority tasks complete executing before their relative deadlines If so, the entire system be schedulable… That is: don’t simulate the entire system, simply show that it has correct characteristics following a critical instant –This process is called time demand analysis
11
KUKUM Real Time System 11/21 2. Time-Demand Analysis
12
KUKUM Real Time System 12/21 Time Demand Analysis
13
KUKUM Real Time System 13/21 Time Demand Analysis
14
KUKUM Real Time System 14/21 Time Demand Analysis
15
KUKUM Real Time System 15/21 Time Demand Analysis
16
KUKUM Real Time System 16/21 Time demand Analysis: Summary
17
KUKUM Real Time System 17/21 Practical Factors
18
KUKUM Real Time System 18/21 Blocking and Priority Inversion
19
KUKUM Real Time System 19/21 Self-Suspension and Context Switches
20
KUKUM Real Time System 20/21 Tick Scheduling
21
KUKUM Real Time System 21/21
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.