0% found this document useful (0 votes)
7 views

Chapter 8 (Part B)

The document discusses real-time scheduling algorithms, focusing on Off Time and On Line Scheduling, highlighting their characteristics and disadvantages. It explains the Rate Monotonic Algorithm, which assigns priorities based on periodic process rates, and provides examples demonstrating its application and CPU utilization calculations. Additionally, it introduces the Earliest Deadline First algorithm, which allows dynamic priority allocation based on task deadlines.

Uploaded by

Sparsh Goyal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Chapter 8 (Part B)

The document discusses real-time scheduling algorithms, focusing on Off Time and On Line Scheduling, highlighting their characteristics and disadvantages. It explains the Rate Monotonic Algorithm, which assigns priorities based on periodic process rates, and provides examples demonstrating its application and CPU utilization calculations. Additionally, it introduces the Earliest Deadline First algorithm, which allows dynamic priority allocation based on task deadlines.

Uploaded by

Sparsh Goyal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 25

Real-Time Operating System

Chapter 8
Embedded System Design
UCS614
USE F5 to listen the audio embedded in PPT
Real-time Scheduling Algorithms
Real-time Scheduling Algorithms
• Off Time Scheduling
– Generate scheduling information prior to system
execution
– Scheduling is based on knowledge of release time,
deadlines and execution time for all the tasks
– This is deterministic system model
– Characteristics of the tasks are known ‘a priori’
– Disadvantage is the inflexibility
Real-time Scheduling Algorithms
• On Line Scheduling
– Parameters of the task and the number and types
of tasks are not known a priori
– Scheduler must accommodate dynamic changes in
the user demand and availability of resources.
– Possibly not able to make best use of all resources
Real-time Scheduling Algorithms
Example:

Schedule the tasks


i) Without pre-emption
ii) With pre-emption
Real-time Scheduling Algorithms
Solution
Without pre-emption
Real-time Scheduling Algorithms
Solution
With pre-emption
Real-time Scheduling Algorithms
Solution
With pre-emption
Rate Monotonic Algorithm
• Assigning priorities as a monotonic function of
the rate of a (periodic) process
– Period increases, the priority decreases
– Process of lowest period will get the highest
priority
• Sufficient condition for ‘scheduling’ using the
RM algorithm
Rate Monotonic Algorithm
Rate Monotonic Algorithm
• RM algorithm uses static priority with pre-
emption.
Rate Monotonic Algorithm
Example 2:
Rate Monotonic Algorithm
Solution:
CPU Utilization 5/12 + 3/7 =0.844
RHS of inequality = 0.828
Rate Monotonic Algorithm
Example 3:
Rate Monotonic Algorithm
Solution:
CPU Utilization 4/15 + 2/12 + 5/20 =0.684
RHS of inequality = 0.782

Since LHS < RHS, sufficient condition is satisfied.


The task set is definitely schedulable.
Rate Monotonic Algorithm
Solution:
Rate Monotonic Algorithm
Solution:
Rate Monotonic Algorithm
Example 4:
Rate Monotonic Algorithm
Solution:
Earliest Deadline First
• Dynamic priority allocation
• Priority changes at run time
• Highest priority task is one that has closest
deadline
• Task that can not be scheduled using RM, can
be scheduled by EDF
Earliest Deadline First
Example 5:
Earliest Deadline First
Solution: Not schedulable using RM
Earliest Deadline First
Solution: Not schedulable using EDF also. Wrong
solution in Book.
Earliest Deadline First
Solution: Not schedulable using EDF also. Wrong
solution in Book.
Earliest Deadline First
Solution:

You might also like