You are on page 1of 9

REAL TIME OPERATING SYSTEM

Brief History of OS, Defining RTOS, Objects, Services, Characteristics


of RTOS, Structure, Operations and use

What do you mean by Real-Time Operating System?

A real-time operating system (RTOS) is a special-purpose operating system used in computers


that has strict time constraints for any job to be performed. It is employed mostly in those
systems in which the results of the computations are used to influence a process while it is
executing. Whenever an event external to the computer occurs, it is communicated to the
computer with the help of some sensor used to monitor the event. The sensor produces the signal
that is interpreted by the operating system as an interrupt. On receiving an interrupt, the
operating system invokes a specific process or a set of processes to serve the interrupt.

This process is completely uninterrupted unless a higher priority interrupt occurs during its
execution. Therefore, there must be a strict hierarchy of priority among the interrupts. The
interrupt with the highest priority must be allowed to initiate the process , while lower priority
interrupts should be kept in a buffer that will be handled later. Interrupt management is important
in such an operating system.

Real-time operating systems employ special-purpose operating systems because conventional


operating systems do not provide such performance.
The various examples of Real-time operating systems are:

 MTS
 Lynx
 QNX
 VxWorks etc.

Applications of Real-time operating system (RTOS):

RTOS is used in real-time applications that must work within specific deadlines. Following are
the common areas of applications of Real-time operating systems are given below.

 Real-time running structures are used inside the Radar gadget.


 Real-time running structures are utilized in Missile guidance.
 Real-time running structures are utilized in on line inventory trading.
 Real-time running structures are used inside the cell phone switching gadget.
 Real-time running structures are utilized by Air site visitors to manipulate structures.
 Real-time running structures are used in Medical Imaging Systems.
 Real-time running structures are used inside the Fuel injection gadget.
 Real-time running structures are used inside the Traffic manipulate gadget.
 Real-time running structures are utilized in Autopilot travel simulators.
Types of Real-time operating system

Following are the three types of RTOS systems are:

Hard Real-Time operating system:

In Hard RTOS, all critical tasks must be completed within the specified time duration, i.e., within
the given deadline. Not meeting the deadline would result in critical failures such as damage to
equipment or even loss of human life.

For Example,

Let's take an example of airbags provided by carmakers along with a handle in the driver's seat.
When the driver applies brakes at a particular instance, the airbags grow and prevent the driver's
head from hitting the handle. Had there been some delay even of milliseconds, then it would
have resulted in an accident.
Similarly, consider an on-stock trading software. If someone wants to sell a particular share, the
system must ensure that command is performed within a given critical time. Otherwise, if the
market falls abruptly, it may cause a huge loss to the trader.

Soft Real-Time operating system:

Soft RTOS accepts a few delays via the means of the Operating system. In this kind of RTOS,
there may be a closing date assigned for a particular job, but a delay for a small amount of time
is acceptable. So, cut off dates are treated softly via means of this kind of RTOS.

For Example,

This type of system is used in Online Transaction systems and Livestock price quotation
Systems.

Firm Real-Time operating system:

In Firm RTOS additionally want to observe the deadlines. However, lacking a closing date might
not have a massive effect, however may want to purposely undesired effects, like a massive
discount within the fine of a product.

For Example, this system is used in various forms of Multimedia applications.

Advantages of Real-time operating system:

The benefits of real-time operating system are as follows-:

 Easy to layout, develop and execute real-time applications under the real-time operating
system.
 The real-time working structures are extra compact, so those structures require much less
memory space.
 In a Real-time operating system, the maximum utilization of devices and systems.
 Focus on running applications and less importance to applications that are in the queue.
 Since the size of programs is small, RTOS can also be embedded systems like in
transport and others.
 These types of systems are error-free.
 Memory allocation is best managed in these types of systems.

Disadvantages of Real-time operating system:

The disadvantages of real-time operating systems are as follows-

 Real-time operating systems have complicated layout principles and are very costly to
develop.
 Real-time operating systems are very complex and can consume critical CPU cycles.
PART 2
A Real Time Operating System, commonly known as an RTOS, is a software component that
rapidly switches between tasks, giving the impression that multiple programs are being executed
at the same time on a single processing core.

In actual fact the processing core can only execute one program at any one time, and what the
RTOS is actually doing is rapidly switching between individual programming threads (or Tasks)
to give the impression that multiple programs are executing simultaneously.

OS or RTOS?

The difference between an OS (Operating System) such as Windows or Unix and an RTOS (Real
Time Operating System) found in embedded systems, is the response time to external events.
OS’s typically provide a non-deterministic, soft real time response, where there are no
guarantees as to when each task will complete, but they will try to stay responsive to the user. An
RTOS differs in that it typically provides a hard real time response, providing a fast, highly
deterministic reaction to external events. The difference between the two can be highlighted
through examples – compare, for example, the editing of a document on a PC to the operation of
a precision motor control.

Scheduling Algorithms

When switching between Tasks the RTOS has to choose the most appropriate task to load next.
There are several scheduling algorithms available, including Round Robin, Co-operative and
Hybrid scheduling. However, to provide a responsive system most RTOS’s use a pre-emptive
scheduling algorithm.

Tasks and Priorities

In a pre-emptive system each Task is given an individual priority value. The faster the required
response, the higher the priority level assigned. When working in pre-emptive mode, the task
chosen to execute is the highest priority task that is able to execute. This results in a highly
responsive system.

Why use an RTOS?

There are well-established techniques for writing good embedded software without the use of an
RTOS. In some cases, these techniques may provide the most appropriate solution; however as
the solution becomes more complex, the benefits of an RTOS become more apparent. These
include:

Priority Based Scheduling: The ability to separate critical processing from non-critical is a
powerful tool.
Abstracting Timing Information: The RTOS is responsible for timing and provides API
functions. This allows for cleaner (and smaller) application code.

Maintainability/Extensibility: Abstracting timing dependencies and task based design results in


fewer interdependencies between modules. This makes for easier maintenance.

Modularity: The task based API naturally encourages modular development as a task will
typically have a clearly defined role.

Promotes Team Development: The task-based system allows separate designers/teams to work
independently on their parts of the project.

Easier Testing: Modular task based development allows for modular task based testing.

Code Reuse: Another benefit of modularity is that similar applications on similar platforms will
inevitably lead to the development of a library of standard tasks.

Improved Efficiency: An RTOS can be entirely event driven; no processing time is wasted
polling for events that have not occurred.

Idle Processing: Background or idle processing is performed in the idle task. This ensures that
things such as CPU load measurement, background CRC checking etc will not affect the main
processing.

What should be considered when choosing an RTOS?

Responsiveness: The RTOS scheduling algorithm, interrupt latency and context switch times
will significantly define the responsiveness and determinism of the system. The most important
consideration is what type of response is desired – Is a hard real time response required? This
means that there are precisely defined deadlines that, if not met, will cause the system to fail.
Alternatively, would a non-deterministic, soft real time response be appropriate? In which case
there are no guarantees as to when each task will complete.

Available system resources: Micro kernels use minimum system resources and provide limited
but essential task scheduling functionality. Micro kernels generally deliver a hard real time
response, and are used extensively with embedded microprocessors with limited RAM/ROM
capacity, but can also be appropriate for larger embedded processor systems.

Alternatively, a full featured OS like Linux or WinCE could be used. These provide a feature
rich operating system environment, normally supplied with drivers, GUI’s and middleware
components. Full featured OS’s are generally less responsive, require more memory and more
processing power than micro kernels, and are mainly used on powerful embedded processors
where system resources are plentiful.
Open source or professionally licensed: There are widely used, free open source RTOS’s
available, distributed under GPL or modified GPL licenses. However, these licenses may contain
copy left restrictions and offer little protection. Professionally licensed RTOS products remove
the copy left restrictions, offer full IP infringement indemnification and warranties. In addition,
you have a single company providing support and taking responsibility for the quality of your
product.

Quality: What emphasis does the RTOS supplier place on quality within their organisation?
Quality is more than just a coding standard. Are the correct procedures in place to guarantee the
quality of future products and support? Well-managed companies that take quality seriously tend
to be ISO 9001 certified.

Safety Certification: Pre-certified and certifiable RTOS’s are available for applications that
require certification to international design standards such as DO-178C and IEC 61508. These
RTOS’s provide key safety features, and the design evidence required by certification bodies to
confirm that the process used to develop the RTOS meets the relevant design standard.

Licensing: It’s not only the RTOS functionality and features that you’ll need to consider, but the
licensing model that will work best for your project budget and the company’s “return on
investment”.

RTOS Vendor: The company behind the RTOS is just as important as selecting the correct
RTOS itself. Ideally you want to build a relationship with a supplier that can support not only
your current product, but also your products of the future. To do this you need to select a
proactive supplier with a good reputation, working with leading silicon manufacturers to ensure
they can support the newest processors and tools.

Trust, quality of product, and quality of support is everything.

How does the RTOS affect the development of the design?

The choice of RTOS can greatly affect the development of the design. By selecting an
appropriate RTOS the developer gains:

 A Task based design that enhances modularity, simplifies testing and encourages code
reuse;
 An environment that makes it easier for engineering teams to develop together;
 Abstraction of timing behaviour from functional behaviour, which should result in
smaller code size and more efficient use of available resources.

Peripheral support, memory usage and real-time capability are key features that govern the
suitability of the RTOS. Using the wrong RTOS, particularly one that does not provide sufficient
real time capability, will severely compromise the design and viability of the final product.

The RTOS needs to be of high quality and easy to use. Developing embedded projects is difficult
and time consuming – the developer does not want to be struggling with RTOS related problems
as well. The RTOS must be a trusted component that the developer can rely on, supported by in-
depth training and good, responsive support.

Characteristics of a real-time operating system (PART I)

Real-time operating systems generally have the following characteristics:

 Small footprint. Compared to general OSes, real-time operating systems are lightweight.
 High performance. RTOSes are typically fast and responsive.
 Determinism. Repeating inputs end in the same output.
 Safety and security. Safety-critical and security standards are typically the highest
priority, as RTOSes are frequently used in critical systems.
 Priority-based scheduling. Tasks that are assigned a high priority are executed first
followed by lower-priority jobs.
 Timing information. RTOSes are responsible for timing and providing application
programming interface

Characteristics of a real-time operating system (PART II)

Following are the some of the characteristics of Real-time System:

1. Time Constraints: Time constraints related with real-time systems simply means that
time interval allotted for the response of the ongoing program. This deadline means that
the task should be completed within this time interval. Real-time system is responsible
for the completion of all tasks within their time intervals.
2. Correctness: Correctness is one of the prominent part of real-time systems. Real-time
systems produce correct result within the given time interval. If the result is not obtained
within the given time interval then also result is not considered correct. In real-time
systems, correctness of result is to obtain correct result in time constraint.
3. Embedded: All the real-time systems are embedded now-a-days. Embedded system
means that combination of hardware and software designed for a specific purpose. Real-
time systems collect the data from the environment and passes to other components of the
system for processing.
4. Safety: Safety is necessary for any system but real-time systems provide critical safety.
Real-time systems also can perform for a long time without failures. It also recovers very
soon when failure occurs in the system and it does not cause any harm to the data and
information.
5. Concurrency: Real-time systems are concurrent that means it can respond to a several
number of processes at a time. There are several different tasks going on within the
system and it responds accordingly to every task in short intervals. This makes the real-
time systems concurrent systems.
6. Distributed: In various real-time systems, all the components of the systems are
connected in a distributed way. The real-time systems are connected in such a way that
different components are at different geographical locations. Thus all the operations of
real-time systems are operated in distributed ways.
7. Stability: Even when the load is very heavy, real-time systems respond in the time
constraint i.e. real-time systems does not delay the result of tasks even when there are
several task going on a same time. This brings the stability in real-time systems.

Popular RTOS software and factors for choosing an OS

Popular open source and commercial RTOS software products include the following:

 FreeRTOS from Amazon Web Services. This open source microcontroller OS is


designed to simplify the development, security, deployment and maintenance of
microcontroller edge devices.
 QNX Neutrino from BlackBerry. This commercial real-time operating system is similar
to Unix and is designed to work in embedded systems. This is also one of the first
commercially successful microkernel OSes.
 VxWorks from Wind River. This RTOS supports application deployment in containers.
Mars Exploration Rovers run VxWorks.
 SafeRTOS from Wittenstein. This pre-certified safety real-time operating system is
designed for embedded processors.

You might also like