0% found this document useful (0 votes)
658 views36 pages

Introduction To Real Time Operating Systems

The document provides an introduction to real-time operating systems (RTOS). It discusses that RTOS are used for applications where processing must occur within fixed time intervals. It describes key characteristics of RTOS including priority-based scheduling, interrupt service routines, synchronization between processes, and efficient use of resources without wasted time. Example applications mentioned include traffic lights, medical devices, and industrial systems. The document also outlines components of RTOS like schedulers, function libraries, and memory management.

Uploaded by

Keertana
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)
658 views36 pages

Introduction To Real Time Operating Systems

The document provides an introduction to real-time operating systems (RTOS). It discusses that RTOS are used for applications where processing must occur within fixed time intervals. It describes key characteristics of RTOS including priority-based scheduling, interrupt service routines, synchronization between processes, and efficient use of resources without wasted time. Example applications mentioned include traffic lights, medical devices, and industrial systems. The document also outlines components of RTOS like schedulers, function libraries, and memory management.

Uploaded by

Keertana
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/ 36

INTRODUCTION TO REAL TIME OPERATING

SYSTEMS

RTOS
Real Time Operating Systems
• The real-time operating system used for a real-
time application means for those applications
where data processing should be done in the
fixed and small quantum of time.
• It is different from general purpose computer
 where time concept is not considered as much
crucial as in Real-Time Operating System.
• RTOS is a time-sharing system based on clock
interrupts.
RTOS
• Interrupt Service Routine (ISR) serve the interrupt,
raised by the system.
• RTOS uses Priority to execute the process.
• When a high priority process enters in system low
priority process is pre-empted to serve higher priority
process.
• Real-time operating system synchronizes the process.
• So that they can communicate with each other.
• Resources can be used efficiently without wastage of
time.
RTOS- Applications
• RTOS are used for controlling traffic signal,
Nuclear reactors Control scientific
experiments, medical imaging systems,
industrial system, fuel injection system, home
appliances.
RTOS
• Real time Operating Systems are very fast and
quick respondent systems.
• These systems are used in an environment where a
large number of events (generally external) must
be accepted and processed in a short time.
• Real time processing requires quick transaction and
characterized by supplying immediate response.
• For example, a measurement from a petroleum
refinery indicating that temperature is getting too
high and might demand for immediate attention to
avoid an explosion.
RTOS
• In real time operating system there is a little
swapping of programs between primary and
secondary memory.
• Most of the time, processes remain in primary
memory in order to provide quick response,
therefore, memory management in real time
system is less demanding compared to other
systems.
RTOS- Introduction
• Time Sharing Operating System is based on
Event-driven and time-sharing the design.
• The event Driven: In event-driven switching,
higher priority task requires CPU service first
than a lower priority task, known as priority
scheduling.
• Time Sharing: Switching takes place after fixed
time quantum known as Round Robin
Scheduling.
Three states of the process cycle

• 1) Running : when CPU is executing a process,


then it is in running state.
• 2) Ready : When a process has all the resources
require performing a process, but still it is not in
running state because of the absence of CPU is
known as the Ready state.
• 3) Blocked : when a process has not all required
resources for execution, then it is blocked state.
Interrupt Latency 
• Interrupt latency is the time between which
an interrupt is generated by a device and till it
serviced.
• In RTOS, Interrupt is maintained in a fixed
amount of time, i.e., latency time bounded.
Memory Allocation
• RTOS support static as well as dynamic
memory allocation.
• Both allocations used for different purposes.
• Like Static Memory, the allocation is used for
compiling and design time using stack data
structure.
• Dynamic memory allocation used for runtime
using heap data structure.
Primary functions of RTOS

• 1. Manage the processor and other system


resources to meet the requirements of an
application.
• 2. Synchronize with and respond to the system
events.
• 3. Move the data efficiently among processes
and to perform coordination among these
processes.
Few more examples of real time processing are:

• 1. Airlines reservation system.


• 2. Air traffic control system.
• 3. Systems that provide immediate updating.
• 4. Systems that provide up to the minute 
information on stock prices.
• 5. Defense application systems like as RADAR.
• Real time operating systems mostly use the
preemptive priority scheduling.
• These support more than one scheduling policy and
often allow the user to set parameters associated
with such policies, such as the time-slice in Round
Robin scheduling where each task in the task queue
is scheduled up to a maximum time, set by the
time-slice parameter, in a round robin manner.
• Hundred of the priority levels are commonly
available for scheduling.
• Some specific tasks can also be indicated to be non-
preemptive.
Components of RTOS
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.
Components of RTOS
• 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.
Components of RTOS contd…
• 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.
Components of RTOS contd…
• 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.
Types of RTOS

• Three types of RTOS systems are:


• Hard Real Time
• Firm Real time
• Soft Real Time
Hard Real Time RTOS

• In Hard RTOS, the deadline is handled very


strictly which means that given task must start
executing on specified scheduled time, and
must be completed within the assigned time
duration.
• Example: Medical critical care system, Aircraft
systems, etc.
Firm Real time RTOS

• These type of RTOS also need to follow the


deadlines. However, missing a deadline may
not have big impact but could cause undesired
affects, like a huge reduction in quality of a
product.
• Example: Various types of Multimedia
applications.
Soft Real Time RTOS

• Soft Real time RTOS, accepts some delays by


the Operating system. In this type of RTOS,
there is a deadline assigned for a specific job,
but a delay for a small amount of time is
acceptable. So, deadlines are handled softly by
this type of RTOS.
• Example: Online Transaction system and
Livestock price quotation System.
Applications of Real Time Operating System

• Control systems
• RTOS are designed in such a way so that they can
control actuators and sensors.
• They can execute control system commands.
• Controlled systems are those which can be monitored
by using sensors and their tasks can be altered with
the help of actuators.
• Now the task of the RTOS is to read the data from the
sensors and move the actuators by performing some
calculations so that flight’s movement can be handled.
Applications of Real Time Operating System
• Image processing (IP):
• real time image processing is done so that we can
make some adjustments for the moving objects.
• In this, we need our computers, cameras or other
gadgets should work in real time as utmost precision
is required in the industrial automation tasks.
• For ex, something happens with the conveyor belt
when the item is moving downwards or some other
defect occurs, we can control these problems in the
real time if our system works in real time.
Applications of Real Time Operating System

•  Voice Over IP (VoIP):


• we can transmit voice over IPs or internet 
protocol in real time.
• This is known as VoIP.
• In this our voice is digitalized, compressed into
small form and converted into IP packets in
real time before transmitting it to the other
network on router through IP.
Difference between GPOS and RTOS
General-Purpose Operating System
Real-Time Operating System (RTOS)
(GPOS)
1) It applied for the embedded
1) It used for desktop pc, laptop.
application.
2) Time-based scheduling used like
2) Process-based Scheduling used.
round robin.
3) Interrupt latency is not considered 3) Interrupt lag is minimal, measured in
as much crucial as in RTOS.           few microseconds.
4) Priority inversion mechanism is
4) No priority inversion mechanism is present. Once priority set by the
present in the system.             programmer, it can’t be changed by the
system itself.
5) Kernel operations may or may not be
5) Kernel operation can be preempted.
preempted.  
Considerations for choosing a RTOS
•  Performance: it is the most important factor
needed to be considered while choosing for a
RTOS. As we know RTOS is a system which
gives us guarantee about the data within a
given frame of time. So it does not take care of
our PC whatever is happening with it.  So we
must have to keep a check on its performance.
Considerations for choosing a RTOS
•  Unique features: A good RTOS must be
scalable and it has some extra features like
efficient protection of the memory of the
system, how it operates to execute commands
etc.. So, we have to evaluate these features so
that our system can run effectively and
efficiently.
Considerations for choosing a RTOS
• Your IT team: A good RTOS is that which works
in the favor of our IT team. Here, favor means
reducing the labor intensity of the team. If this
intensity of the team get reduced, then the
team can concentrate on other factors. So we
have to decide those RTOS, through which our
team can easily familiar with.
Considerations for choosing a RTOS
• Middleware: if there will be no middleware
support in RTOS, then the problem of time-
consuming integration of processes will take
place. Here, middleware support means those
components which can be integrated with our
RTOS.
Advantages of RTOS

•  Error free: Real time operating systems are


error-free. So there is no chance of getting an
error when we are performing the task.
• Maximum Consumption: we can achieve
maximum consumption by using RTOS. It keeps
all the devices active and produces more output
by making use of all the resources.
• Embedded system usage: As the programs of
the RTOS are of small size. So, we make use of
RTOS in embedded systems.
Advantages of RTOS

•  Task shifting: In RTOS, shifting time of the tasks is


very small.
• 24/7 performance: RTOS is best used for those
applications which run constantly or you can say
that which runs for 24 hours and 7 days in a week.
This is possible because of fewer shifting of tasks
so that it can give maximum output.
• Application focus: in RTOS, a very few tasks are
managed so that exact results can be given by the
system. It gives very less importance to those
applications which are in waiting state. 
Disadvantages of RTOS
•  Limited tasks: RTOS can run very limited tasks
simultaneously and it concentrates on only those
applications which contain error so that it can avoid
them. Due to this, some tasks have to wait for
unlimited time.
• Low multi-tasking: As RTOS is the system which
concentrates on few tasks. So sometimes it is difficult
for these systems to do multi-tasking.
• Device driver and interrupt signals: Some specific
drivers are needed for the RTOS so that it can give
fast response to the interrupt signals to maintain its
speed.
• Expensive: As stated earlier, a lot of resources are
used by RTOS which makes it expensive
Disadvantages of RTOS

• Low priority of tasks: The tasks which has the low priority
has to wait for a long time as the RTOS maintain the
accuracy of the current programs which are under
execution.
• Thread priority: as we know that there is very less
switching of tasks is done in RTOS. So that’s why its thread
priority is not good.
• Precision of code: as we know, in RTOS, event handling of
tasks is a strict process as it is error-free. So more precision
in code is required which is a difficult task for the
programmer as getting exact precision is not so easy.
• Complex algorithms: it makes use of some complex
algorithms so that the system can give the desired output.
These complex algorithms are difficult to understand.
Disadvantages of RTOS

• Use heavy system resources: real time operating


system makes use of a lot of resources.
Sometimes it is not good for the system. It seems
to be expensive also.
• Not easy to program: Sometime the
programmer has to write the complex programs
for the efficient working of the RTOS which is not
an easy task.
• Other factors: some other factors like error
handling, memory management and CPU are
also needed to be considered.
Why use an RTOS?
• It offers priority-based scheduling, which allows you to
separate analytical processing from non-critical processing.
• The Real time OS provides API functions that allow cleaner
and smaller application code.
• Abstracting timing dependencies and the task-based design
results in fewer interdependencies between modules.
• RTOS offers modular task-based development, which allows
modular task-based testing.
• The task-based API encourages modular development as a
task, will typically have a clearly defined role. It allows
designers/teams to work independently on their parts of the
project.
• An RTOS is event-driven with no time wastage on processing
time for the event which is not occur

You might also like