Rate Monotonic Analysis. Rob Oshana Southern Methodist University. Scheduling policies for realtime systems. Scheduling Policies in RT systems. Two general categories fixed or static scheduling policies dynamic scheduling policies
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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Periodic Arrivals with Fixed Cost of Processing
4
4
4
 10 
periodic arrivals. period T = 10
System Utilization = C/T = .40
System will be able to meet all deadlines. It can finish processing arrivals before the next arrival occurs.
Can a second periodic event be accommodated?
4
4
4
 10 
1. periodic arrival, period T = 10 and C=4
2. periodic arrival, T=10 and C=3 ??
Can a second periodic event be accommodated?
4
4
4
 10 
1. periodic arrival, period T = 10 and C=4
2. periodic arrival, T=10 and C=3 ??
System Utilization C/T = .70
How about 2nd periodic event with T=6 and C=3?
4
4
4
 10 
1. periodic arrival, period T = 10 and C=4
2. periodic arrival, T=6 and C=3 ??
How about 2nd periodic event with T=6 and C=3?
4
4
4
 10 
1. periodic arrival, period T = 10 and C=4
2. periodic arrival, T=6 and C=3 ??
System Utilization C/T = .90
Task #2
6
4
4
4
 10 
Event #2
Event #1
If we process Event #1 before Event #2 then,
2nd event processing will not complete before the next comparable event occurs
Can’t Meet Deadline!
Task #2
6
4
 10 
Try Event #2 before Event #1
We still cannot complete task 1 before the next task 2 event occurs at t=6
unless...
Event #2
Event #1
Task #2
6
4
 10 
Try Event #2 before Event #1
We still cannot complete task 1 before the next task 2 event occurs at t=6
unless…we Interrupt task 1
Event #2
Event #1
Task #2
6
4
 10 
Try Event #2 before Event #1
We still cannot complete task 1 before the next task 2 event occurs at t=6
unless…we Interrupt task 1
Event #2
Giving event #2 priority means that we can meet our deadline IF we preempt the processing of event #1 when event #2 occurs
Event #1
Task Ci Ti Ui
1 3 10 .30
2 3 12 .25
3 4 16 .25
4 7 20 .35
ExampleCan these 4 tasks be scheduled?
Task Ci Ti Ui
1 3 10 .30
2 3 12 .25
3 4 16 .25
4 7 20 .35
Task Ci Ti Ui
1 6 20 .30
2 4 16 .25
3 3 12 .25
Can these tasks always meet their deadlines?
Total Utilization = 80%
It MAY be possible  Rate Monotonic Scheduling applies!
Task Ci Ti Ui
1 2 20 .10
2 4 16 .25
3 3 12 .25
4 1 20 .05
Yes. Total CPU Utilization is 65% < 69%
Task Ci Ti Ui
1 2 20 .10
2 4 16 .25
3 3 12 .25
4 1 20 .05
Total CPU Utilization is 65%
???
Taskh
Uncontrolled priority inversion
Taskmed
Taskmed
Tasklow
Priority
inversion
Normal
execution
Execution in
critical section
Requirements
Control motor speed (1 Khz sampling rate – dV/dT)
Accept keyboard commands to control the motor, change the display, or send data out the
RS232 port
Drive a simple display and refresh 2 times per second
Send data out the RS232 port when there is nothing else to do
Motor
Motor
Control
Motor
DAC
control
ADC
Tach
algorithm
Drive
Keypad
Keypad
System
control
Control algorithm
control
Display
Display
Display interface
algorithm
control
Remote
Remote
McBSP
RS

232
algorithm
output
Task
Rate
Priority
Periodic or
Activation
aperiodic
mechanism
Motor control
1 kHz
1
Periodic
Hardware Interrupt
Keypad
5 hertz
2
Aperiodic
Hardware Interrupt
control
Display
2 hertz
3
Periodic
Software interrupt
control
Remote output
Background
4
Aperiodic
Idle loop (runs
l
continuously in the
background)
Clock source
Periodic clock
Periodic functions
n ticks
tick
DSP
Motor control
timer
DSP function
Periodic
Selectable
Function
source
m ticks
manager
Display control
DSP function
tick
User
Defined
clocking
infrequent execution
medium priority
high priority 
frequent execution
meteorological
data
gathering
task
bus
management
task
communication
task
mutex
information bus
What happened on Mars ?