7/30/2019 RTOS Scheduling
1/21
Scheduling In RTOS
REMOVED
7/30/2019 RTOS Scheduling
2/21
Real-Time Operating System
Focus on the real-time aspects of operating
systems.
Provide a predictable service to the
application tasks
the temporal properties of the system can be
statically analyzed
7/30/2019 RTOS Scheduling
3/21
Classification of Scheduling
Algorithms
7/30/2019 RTOS Scheduling
4/21
Scheduling Algorithm
Rate Monotonic (RM) Algorithm
a dynamic preemptive algorithm
assigning priorities to tasks according to the
frequency or rate of the tasks.
higher rate task has a higher priority
optimal for single processor systems
7/30/2019 RTOS Scheduling
5/21
Scheduling Algorithm
Least Laxity (LL) Algorithm
a dynamic preemptive algorithm
assigning priorities to tasks according to the
laxity (the difference between the deadline
interval and the computation time)
shorter laxity task has higher priorityoptimal for single processor systems
7/30/2019 RTOS Scheduling
6/21
Scheduling Algorithm
Earliest-Deadline-First (EDF) Algorithm
a dynamic preemptive algorithm
assigning priorities to tasks according to the
deadline
earlier deadline task has a higher priority
optimal for single processor systems
7/30/2019 RTOS Scheduling
7/21
Scheduling Algorithm
Priority Ceiling Protocol
used to schedule a set of periodic tasks that
have exclusive access to common resourcesprotected by semaphores
a task will be blocked once at most by the
duration of a single critical section
solve the problems of chained blocking and
deadlocks
7/30/2019 RTOS Scheduling
8/21
Rate Monotonic Analysis
a collection of quantitative methods and
algorithms
used to specify, understand, analyze and
predict the timing behavior of real-time
software systems
save system resources and developmenttime
7/30/2019 RTOS Scheduling
9/21
Rate Monotonic Analysis
important factors The worst-case execution time of each
thread of control
the minimum amount of time between
successive invocations of each thread
the priority levels associated with the
execution of each thread
sources of overhead such as those due to an
operating system
7/30/2019 RTOS Scheduling
10/21
Rate Monotonic Analysis
important factors (cont) Dealys due to interprocess communication
and synchronization
allocation of threads of control to physical
resources such as CPUs, buses and
networks
7/30/2019 RTOS Scheduling
11/21
What is RapidRMA
RapidRMA: Hard real-time systems, such as flight control,
automotive control, medical device, simulator, and
telemetry systems
Soft real-time systems, such as networks and telecom
RapidRMA provides sophisticated tools for
designing new systems and for evaluating existing
systems
RapidRMA can also save data as tabular reports
for off-line analysis or transfer into a spreadsheet
7/30/2019 RTOS Scheduling
12/21
When do you use RapidRMA?
During system design, to validate the timing
requirements of a new system before coding
When prototyping, to identify potentialarchitecture problems and revalidate timing
requirements
On existing systems, to pinpoint potential timing
problems and bottlenecks in the architecture
Iteratively throughout the life of the system,
whenever new timing data is available
7/30/2019 RTOS Scheduling
13/21
RapidRMA Algorithms
RapidRMA is based on the following Analysis
and Scheduling algorithms:
Rate Monotonic
Deadline Monotonic
Earliest Deadline First
Cyclic Executive
HKL (Harbour, Klein, and Lehocsky)
SGL (Sun, Gardener, and Liu)
7/30/2019 RTOS Scheduling
14/21
RapidRMA Algorithms
RMA addresses the timingrequirements of tasks,
not the taskfunctionality
RapidRMA software modules implement bothcommonly used and new scheduling algorithms
and access control protocols for Periodictask handling
Aperiodicjob handling Online and offline scheduling ofimprecise
computations
Many other recently developed techniques
7/30/2019 RTOS Scheduling
15/21
LynxOS
Unix-compatible
Multi-processor
Multi-thread
Real-time
7/30/2019 RTOS Scheduling
16/21
LynxOS scheduling
Hard-real-time scheduling
256 global user-thread priority levels
Round-Robin, Quantum, and FIFO policies
at each of 256 priorities
Fast context switching and short blocking
times
Preemptive RTOS kernel
Priority inheritance through semaphores
7/30/2019 RTOS Scheduling
17/21
OSE Realtime Kernel
Categories of Processes
Static Processes
created at system start by the kernel
exist at all times, the life time of the system
Dynamic Processes
created and killed freely during run-time enable the system to run multiple instances of the
same code
7/30/2019 RTOS Scheduling
18/21
OSE Realtime Kernel
States of the processes
Running
only one process can be in this state
Ready
placed in a ready queue
Waiting waiting for some event to occur
7/30/2019 RTOS Scheduling
19/21
OSE Realtime Kernel
Scheduling Principles
Pre-emptive
Cyclic
Priority Based
Round Robin
7/30/2019 RTOS Scheduling
20/21
OSE Realtime Kernel
Processes Types
Interrupt Processes
Timer Interrupt Processes
Prioritized Processes
Background Processes
Phantom Processes
7/30/2019 RTOS Scheduling
21/21
Conclusion
OSE is designed to satisfy requirements for
non-stop operation and distribution over
many CPUs. It provides the platform
necessary for seamless operation of fault-
tolerant and safety-critical systems.
LynxOS can control the processes
scheduling more effeciently, processes can
execute at their assigned priorities
regardless of other activities in the system.
Top Related