Arm Rtos
Arm Rtos
Standalone Applications
Often no OS involved
Micro controller based Embedded Systems
Some Real Time Applications are huge & complex
Multiple threads
Complicated Synchronization Requirements
Filesystem / Network / Windowing support
OS primitives reduce the software design time
Real-time and embedded systems operate in
constrained environments in which computer
memory and processing power are limited.
Applications
RTOS-kernel
BSP
Custom-Hardware
"kernel" ?
The part of an operating system that provides the
most basic services to application software
running on a processor.
-- each handling a distinct topic, a distinct goal, and perhaps its own real-time
deadline.
Services in this category include the ability to launch tasks and assign priorities to
them.
The main RTOS service in this category is the scheduling of tasks as the embedded
system is in operation.
The Task Scheduler controls the execution of application software tasks, and can
make them run in a very timely and responsive fashion.
Intertask Communication and Synchronization:
These services make it possible for tasks to pass information from one
to another, without danger of that information ever being damaged.
They also make it possible for tasks to coordinate, so that they can
productively cooperate with one another.
Without the help of these RTOS services, tasks might well communicate
corrupted information or otherwise interfere with each other.
Timers:
Many embedded systems have stringent timing requirements
Often these chunks of memory are then passed from task to task, as a
means of quickly communicating large amounts of data between tasks.
Some very small RTOS kernels that are intended for tightly memory-
limited environments, do not offer Dynamic Memory Allocation
services.
Device I/O Supervisor:
Many (but not all) RTOS kernels also provide a "Device I/O Supervisor"
category of services.
Their services can inject random delays into application software and thus
cause slow responsiveness of an application at unexpected times.
Task scheduling
Most RTOSs do their scheduling of tasks using a scheme called
"priority-based preemptive scheduling.“
"Preemptive" means that the scheduler is allowed to stop any task at any
point in its execution, if it determines that another task needs to run
immediately.
The basic rule that governs priority-based preemptive scheduling is
that at every moment in time, "The Highest Priority Task that is Ready
to Run, will be the Task that Must be Running.“
The low-priority task will only get to run after the higher-priority task
has finished with its current work.
Each time the priority-based preemptive scheduler is alerted by an
external world trigger (such as a switch closing) or a software trigger
(such as a message arrival),
it must go through the following 5 steps:
• Determine whether the currently running task should continue to
run.
• If not ? Determine which task should run next.
• Save the environment of the task that was stopped (so it can continue
later).
• Set up the running environment of the task that will run next.
• Allow this task to run.
These 5 steps together are called "task switching."
Intertask communication and synchronization
RTOSs, offer a variety of mechanisms for communication and
synchronization between tasks.