You are on page 1of 11

RTOS

Real Time Operating Systems


What is a Real-Time Operating System
(RTOS)?
• Real-time operating system (RTOS) is an operating
system intended to serve real time application that
process data as it comes in, mostly without buffer
delay.
• In a RTOS, Processing time requirement are
calculated in tenths of seconds increments of time.
It is time-bound system that can be defined as fixed
time constraints. In this type of system, processing
must be done inside the specified constraints.
Otherwise, the system will fail.
Components of RTOS
• The Scheduler: This component of RTOS tells that in which order, the
tasks can be executed which is generally based on the priority.
• Symmetric Multiprocessing (SMP): It is a number of multiple
different tasks that can be handled by the RTOS so that parallel
processing can be done.
• Function Library: It is an important element of RTOS that acts as an
interface that helps you to connect kernel and application code. This
application allows you to send the requests to the Kernel using a
function library so that the application can give the desired results.
• Memory Management: this element is needed in the system to
allocate memory to every program, which is the most important
element of the RTOS.
• Fast dispatch latency: It is an interval between the termination of the
task that can be identified by the OS and the actual time taken by the
thread, which is in the ready queue, that has started processing.
• User-defined data objects and classes: RTOS system makes use of
programming languages like C or C++, which should be organized
according to their operation.
Difference between in GPOS and RTOS
Characteristics of RTOS
• Reliability: Any RTOS that gets utilised must be extremely
reliable. In RTOS, reliability comes from the operational
end of the system. The system must be able to function for
a respectively long time without any human interference.
In this sense, reliability also refers to the system being able
to choose the right or most profitable action for current
operations.
• Predictability: A RTOS must be able to execute actions
within a specified time frame and produce excepted
results. The targets, which get achieved, are set during the
production phase or procedural planning.
Characteristics of RTOS
• Performance: Ultimately as with many other platforms,
RTOS are designed to make the work easier. It does so by
solving the problems provided, which therefore reduce the
workload.
• Manageability: To reduce the cost of implementation,
software and hardware associated with RTOS must be
manageable (of reasonable size).
• Scalability: RTOS must be able to adapt to
downgrades/upgrades, or any modifications. Such
provisions must be made during the design phase and
installed in any RTOS.
Semaphore
• a signal between tasks/interrupts that does not carry
any additional data. The meaning of the signal is implied
by the semaphore object, so you need one semaphore
for each purpose. The most common type of semaphore
is a binary semaphore, that triggers activation of a task.
The typical design pattern is that a task contains a main
loop with an RTOS call to “take” the semaphore. If the
semaphore is not yet signaled, the RTOS blocks the task
from executing further until some task or interrupt
routine “gives” the semaphore, i.e., signals it.
Types of Semaphores
• Counting SemaphoresThese are integer value semaphores and
have an unrestricted value domain. These semaphores are used
to coordinate the resource access, where the semaphore count
is the number of available resources. If the resources are
added, semaphore count automatically incremented and if the
resources are removed, the count is decremented.
• Binary SemaphoresThe binary semaphores are like counting
semaphores but their value is restricted to 0 and 1. The wait
operation only works when the semaphore is 1 and the signal
operation succeeds when semaphore is 0. It is sometimes
easier to implement binary semaphores than counting
semaphores.
Advantages of Semaphores
• Semaphores allow only one process into the critical
section. They follow the mutual exclusion principle strictly
and are much more efficient than some other methods of
synchronization.
• There is no resource wastage because of busy waiting in
semaphores as processor time is not wasted unnecessarily
to check if a condition is fulfilled to allow a process to
access the critical section.
• Semaphores are implemented in the machine
independent code of the microkernel. So they are machine
independent.
Disadvantages of Semaphores
• Semaphores are complicated so the wait and signal
operations must be implemented in the correct order
to prevent deadlocks.
• Semaphores are impractical for last scale use as their
use leads to loss of modularity. This happens because
the wait and signal operations prevent the creation of
a structured layout for the system.
• Semaphores may lead to a priority inversion where
low priority processes may access the critical section
first and high priority processes later.

You might also like