Real Time Operating System

FREE Online Courses: Knowledge Awaits – Click for Free Access!

A real-time operating system is a type of OS that serves real-time applications and processes data without buffer delay. This time-bound system has fixed time constraints and calculates processing time requirements in tenths of seconds increments of time. To avoid system failure, processing should be done within the specified constraints. We use RTOS in industrial control, flight control, and real-time simulations.

Why use Real Time Operating System?

Following are the reasons we should use RTOS:

  • It provides priority-based scheduling that allows the user to separate analytical processing and non-critical processing.
  • It provides API functions that make an application code cleaner and smaller.
  • Fewer interdependencies between modules due to task-based designs and abstracting timing dependencies.
  • It offers modular task-based development, resulting in modular task-based testing.
  • Task-based API encourages modular development as it gives the tasks a clearly defined role. This helps the designers work independently on their parts of the project.
  • It is an event-driven OS and doesn’t waste time processing other events.

Components of RTOS

Following are the components of Real Time Operating System:

1. The Scheduler: Tells the order in which tasks should be executed. This order is generally based on priority.

2. Symmetric Multiprocessing (SMP): These are various multiple tasks that the RTOS handles in order to perform parallel processing.

3. Function Library: It acts as an interface and helps connect the kernel to the application code. This allows the user to send requests to the Kernel using a function library and gives the application the desired results.

4. Memory Management: It allocates memory to every program.

5. Fast dispatch latency: The interval between the termination of a task that is identified by the OS and the actual time taken by the thread that has started processing in the ready queue.

6. User-defined data objects and classes: The programming languages like C or C++ used by the RTOS should be organized according to their operation.

Types of RTOS

Types of RTOS

Following are the three types of RTOS systems:

1. Hard Real-Time:

This type handles deadlines very strictly. Thus, the given task must start and finish execution within the assigned time duration. Example: Medical critical care system and aircraft systems.

2. Firm Real-Time:

This type needs to follow deadlines though one or two missing deadlines would not have a big impact they could still cause undesired effects. These effects include a huge reduction in the quality of a product. Example: Multimedia applications.

3. Soft Real-Time:

This type handles delays by the OS softly. Though there is a deadline assigned for a specific job, a little delay is acceptable. Example: Livestock price quotation system.

Terms in RTOS

Following are some important terms used in RTOS:

  • Task: A set of related tasks jointly provide system functionality.
  • Job: A small piece of work assigned to a processor that may or may not require resources.
  • Release time of a job: The time at which a job becomes ready for execution.
  • Execution time of a job: Time taken by a job to finish its execution.
  • Deadline of a job: A job should finish its execution by this time.
  • Processors: Also known as active resources, they are important for job execution.
  • Maximum: The allowable response time of a job is called a relative deadline.
  • Response time of a job: The time from the release of a job when the instant finishes.
  • Absolute deadline: The relative deadline that includes release time.

Features of RTOS

Some important features of RTOS:

  • Consumes fewer memory and resources.
  • Highly predictable response time.
  • Unpredictable environment.
  • Saves the state of the interrupted task and determines the task to be run next.
  • It restores the state of a task to its previous state and passes control of the CPU.

Factors to select an Real-Time Operating System

Some essential factors for selecting RTOS are:

  • Performance: This is the most important factor.
  • Middleware: No middleware can cause the issue of time-taken integration of processes to occur.
  • Error-free: To ensure that no error occurs while performing the task.
  • Embedded system usage: Small size programs in RTOS make it good for embedded systems.
  • Maximum Consumption: Helps achieve maximum consumption.
  • Task shifting: Less shifting time of tasks.
  • Unique features: Has features like how to operate to execute a command, efficient protection of system memory, etc.
  • 24/7 performance: Ideal for applications that require 24/7 running.

Difference between GPOS and RTOS

General-Purpose Operating SystemReal-Time Operating System
Unnoticed priority inversionNo predictability guarantees
Kernel’s operation may/may not be preemptedKernel’s operation can be preempted
For desktop PC and laptopFor embedded application
Process-based SchedulingTime-based scheduling
Interrupt latency is not importantInterrupt lag is minimal
No priority inversion mechanismPriority inversion mechanism cannot modify by the system

Applications of Real Time Operating System

Following are the applications of RTOS:

  • Reservation system
  • Traffic control system.
  • Systems providing immediate updating and up-to-date and minute information like stock prices.
  • Defense application systems and Command Control Systems
  • Network Multimedia Systems
  • Internet Telephony
  • Anti-lock Brake Systems
  • Heart Pacemaker

Disadvantages of Real Time Operating System

Following are the disadvantages of using RTOS:

  • Runs minimal tasks together, and only concentrates on applications that have an error in order to avoid them.
  • It concentrates on a few tasks which makes multitasking hard.
  • Specific drivers are necessary for fast response time to interrupt signals and maintain speed.
  • It is expensive.
  • Tasks with low priority need to wait for a long time.
  • Minimum switching of tasks.
  • The use of complex algorithms makes it difficult to understand.
  • Uses a lot of resources that aren’t suitable for the system.

Summary

RTOS is an OS that serves real-time applications and processes data without buffer delay. Some important components of the RTOS system are: Scheduler, Symmetric Multiprocessing, Function Library, Memory Management, Fast dispatch latency, and User-defined data objects and classes. There are three types of RTOS, namely, Hard time, Soft time, and Firm time. Its biggest drawback is that it only concentrates on a few tasks.

Did we exceed your expectations?
If Yes, share your valuable feedback on Google

follow dataflair on YouTube

Leave a Reply

Your email address will not be published. Required fields are marked *