Real Time Operating System (RTOS)

What is RTOS?

Real Time Operating System (RTOS) On hearing this term many of the programmers and computer enthusiasts think differently. It differs from the rtosgeneral purpose OS, RTOS is a real time OS working with real time constraints as power, time and efficient usage of memory. Most of the embedded systems are bound to real time constraints and it is achieved using real time system. General purpose operating systems are suitable to do multiple tasks at the same time, but synchronization is a problem with GPOS. To do multiple tasks with worst case execution time on a particular architecture real time OS is used in an embedded computing system. The main concern of RTOS is it produces an accurate output within the deadline or time.

The behavior of an embedded system or general purpose machine depends upon the nature of application design. A general purpose operating system was designed to handle multiple tasks with no time limit, we cannot say in a certain time a task will get happened.

An example is form your PC if you copy some data from one device to another device it may take several minutes or more, we cannot predict responsiveness of the system of course, due to the tasks running parallel at that time.

But, a real time embedded system can give an accurate output at right time that means, it is time critical no delay is encouraged for real time systems and if any delay occurs it may lead to catastrophic effects. For example Airbag control system in a car. If you drive a car at a high speed accidents may happen, in such case airbag opens and saves your life.

Difference between GPOS and RTOS

  • General purpose operating systems cannot perform real time tasks whereas RTOS is suitable for real time applications.
  • There is deadline associated with real time kernel but GPOS does not follow timely mechanism.
  • The real time kernel follows preemptive scheduling policy whereas GPOS follow non preemptive scheduling technique.
  • Synchronization is a problem with GPOS whereas synchronization is achieved in real time kernel.
  • Inter task communication is done using real time OS where GPOS does not.
  • Latency is a problem with GPOS but it is overcome using real time OS.
  • Priority inversion cannot be done in GPOS, it is done with real time kernel.
  • Jitter i.e. timing error in task is not present in real time OS, present in GPOS.
  • The mathematical relation cannot be defined for GPOS, for a real time OS mathematical equation can be defined.

Types of Real Time Operating System

Depending upon the nature of application real time OS are designed and they are classified into 3 types:

  1. Soft Real Time Operating System

Soft real time OS is a type of OS where certain deadlines may be missed, they will respond at a time t=0+.

Soft real time systems are not constrained to extreme rules. The critical time of the soft real time may be delayed to some extent. The expected latency between the tasks and time constraints may be deviated.

The preemption period for a soft real time task is about few milliseconds.

Examples

Digital camera, mobile phones, online data base etc.

  1. Hard Real Time Operating System

Hard real time OS is a type of OS we can predict the deadline, they will respond at a time t=0. Hard real time systems are constrained to predicted time constraints, deadlines and latency.

Examples:

Air bag control in cars, anti-lock brake, engine control system etc.

The preemption period for hard real time system is almost less than few microseconds.

  1. Firm Real Time Operating System

This type of RTOS has certain time constraints which are not strict and it may cause undesired effect.

Example for firm RTOS is automated visual inspection in industrial automation. This system examines and detects the defected parts of assembly line. This type is also called event response system.

In short RTOS based system is a time critical system where most of the tasks are completed in time so that most of the deadly events are reduced.

Note: In the next article we are going to see how Real Time Operating system (RTOS) manages the services and achieve its real time constraints.

Tags: