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. The full form of RTOS is Real time operating system.

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.

Why use an RTOS?

Here are important reasons for using 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

Components of RTOS

                    Components of Real Time Operating System

Here, are important Component 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.

  • Peripheral Drivers: As we know in real time system, the system is connected to external events, and in order to send the interrupt from the external system to the operating system we need device drivers.
  • Device Management: RTOS system contains multiple devices including the internal system as well as many peripheral devices and they need to be in sync with each other in order to make the system perform its task. Thus their management is essential.

Types of RTOS

Three types of RTOS systems are:

Hard Real-Time Operating system

A hard real-time operating system is used when we need to complete tasks by a given deadline. If the task is not completed on time then the system is considered to be failed.

Example: Medical critical care system, Aircraft systems, etc.

Soft Real Time

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.

Firm Real-Time Operating System

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.

Terms used in RTOS

Here, are essential terms used in RTOS:

  • Task – A set of related tasks that are jointly able to provide some system functionality.
  • Job – A job is a small piece of work that can be assigned to a processor, and that may or may not require resources.
  • Release time of a job – It’s a time of a job at which job becomes ready for execution.
  • Execution time of a job: It is time taken by job to finish its execution.
  • Deadline of a job: It’s time by which a job should finish its execution.
  • Processors: They are also known as active resources. They are important for the execution of a job.
  • Maximum It is the allowable response time of a job is called its relative deadline.
  • Response time of a job: It is a length of time from the release time of a job when the instant finishes.
  • Absolute deadline: This is the relative deadline, which also includes its release time.

Features of RTOS

Here are important features of RTOS:

  • Occupy very less memory
  • Consume fewer resources
  • Response times are highly predictable
  • Unpredictable environment
  • The Kernel saves the state of the interrupted task ad then determines which task it should run next.
  • The Kernel restores the state of the task and passes control of the CPU for that task.

Factors for selecting an RTOS

Here, are essential factors that you need to consider for selecting RTOS:

  • Performance: Performance is the most important factor required to be considered while selecting for a RTOS.
  • Middleware: if there is no middleware support in Real time operating system, then the issue of time-taken integration of processes occurs.
  • Error-free: RTOS systems are error-free. Therefore, there is no chance of getting an error while performing the task.
  • Embedded system usage: Programs of RTOS are of small size. So we widely use RTOS for embedded systems.
  • Maximum Consumption: we can achieve maximum Consumption with the help of RTOS.
  • Task shifting: Shifting time of the tasks is very less.
  • Unique features: A good RTS should be capable, and it has some extra features like how it operates to execute a command, efficient protection of the memory of the system, etc.
  • 24/7 performance: RTOS is ideal for those applications which require to run 24/7.

Monolithic vs. Microkernel Architecture

An RTOS system typically uses either a monolithic and microkernel architecture:

In a monolithic architecture:

  • The kernel is the heart of the operating system, provides basic services for it’s other components and serving as the main layer between the OS and the hardware.
  • The monolithic RTOS kernel and the operating process share one space—this enables higher performance compared to microkernel configurations.
  • Monolithic RTOSs are fast, but they are difficult to update, and programming errors in the file system, protocol stack, or drivers can cause the system to crash.

In a microkernel architecture:

  • The kernel and operating processes are in separate locations. This architecture is slower than a monolithic RTOS. This is because all operations must return to the kernel before they are passed to the component they reference.
  • The microkernel does not have a filesystem.
  • However, microkernel configurations are easier to program and update, and are more resilient to programming errors.

The Importance of RTOS in Embedded Systems

An embedded system is – in a sense – a computer embedded in a larger system, such as a microcontroller in an electronic device. For non-critical systems with some flexibility in their schedules, developers can use a general-purpose operating system such as Linux. Linux is full-featured, flexible, and mature. However, for critical systems, whether safety-critical or business-critical, it can be necessary to use a real-time operating system.

An RTOS can ensure that an embedded system is predictable and reliable. In many environments, variability in response time or behavior of embedded systems can lead to wasted resources, quality issues, and even physical damage or injury (e.g., in case of medical devices or sensors). This is why RTOS is most often used in embedded systems.

RTOSs are often embedded in intelligent edge devices, also known as electro-mechanical edges or cyber-physical systems, also known as Internet of Things (IoT) devices. In the past, edge devices had limited functionality and would rely on centralized systems for data processing. Today, with the advent of edge computing, these devices often combine artificial intelligence with substantial computing power and real-time components.

Monolithic Kernel Versus Microkernel

CategoryMicrokernelMonolithic
PerformanceSlightly slower performance due to higher number of context switches.Better performance due to smaller number of context switches.
System UpdatesNew drivers and OS services updates can be performed with no changes to the kernel, and thus do not require an OS reboot.New drivers and OS services updates require an OS rebuild and reboot.
Power Fail RecoveryCan restart any service individually, without interrupting the kernel.Recovery of a failed service requires an OS reboot.
Qualification and CertificationEasier and less costly to qualify and certify the kernel. Most system updates do not require a full qualification and certification cycle but rather are limited to the updated service or driver.Difficult and more costly to qualify and certify. System updates require a full qualification and certification cycle as the OS is generally rebuilt.
MaintenanceEasier and less time-consuming to maintain and troubleshoot deployed systems. Users can update, troubleshoot and reboot a service without requiring an entire OS reboot.Challenging and more time-consuming to maintain and troubleshoot. Users require an OS reboot when performing most system updates, troubleshooting steps or a service reboot.

Key Features of RTOS for Embedded Systems

Maintainability and Coding Efficiency

Here are some key features of RTOS systems that provide improved maintainability of embedded systems:

  • Abstracting time dependencies and task-based design reduces interdependencies between modules. This makes maintenance easier.
  • Task-based APIs naturally encourage modular development because tasks have well-defined boundaries. A task-based system also makes it easier for different developers and teams to work independently on each part of a project.
  • Task-based development enables modular testing, which makes it easier to comprehensively cover all software functionality.
  • Broad use of RTOS encourages the development of standard libraries that can be reused across projects.

Improved Processing Speed

Here are key features of RTOS systems that enable faster, predictable processing:

  • Priority-based scheduling enables separating non-critical and critical tasks.
  • RTOS can be completely event-driven. This avoids wasting processing time by polling for events.
  • Background processing like CPU load measurements and background cyclic redundancy checks (CRC) are managed using an “idle task”, without affecting the main process.

Difference between in GPOS and RTOS

Here are important differences between GPOS and RTOS:

General-Purpose Operating System (GPOS)Real-Time Operating System (RTOS)
It used for desktop PC and laptop.It is only applied to the embedded application.
Process-based Scheduling.Time-based scheduling used like round-robin scheduling.
Interrupt latency is not considered as important as in RTOS.Interrupt lag is minimal, which is measured in a few microseconds.
No priority inversion mechanism is present in the system.The priority inversion mechanism is current. So it can not modify by the system.
Kernel’s operation may or may not be preempted.Kernel’s operation can be preempted.
Priority inversion remain unnoticedNo predictability guarantees

Applications of Real Time Operating System

Real-time systems are used in:

  • Airlines reservation system.
  • Air traffic control system.
  • Systems that provide immediate updating.
  • Used in any system that provides up to date and minute information on stock prices.
  • Defense application systems like RADAR.
  • Networked Multimedia Systems
  • Command Control Systems
  • Internet Telephony
  • Anti-lock Brake Systems
  • Heart Pacemaker

Disadvantages of RTOS

Here, are drawbacks/cons of using RTOS system:

  • RTOS system can run minimal tasks together, and it concentrates only on those applications which contain an error so that it can avoid them.
  • RTOS is the system that concentrates on a few tasks. Therefore, it is really hard for these systems to do multi-tasking.
  • Specific drivers are required for the RTOS so that it can offer fast response time to interrupt signals, which helps to maintain its speed.
  • Plenty of resources are used by RTOS, which makes this system expensive.
  • The tasks which have a low priority need to wait for a long time as the RTOS maintains the accuracy of the program, which are under execution.
  • Minimum switching of tasks is done in Real time operating systems.
  • It uses complex algorithms which is difficult to understand.
  • RTOS uses lot of resources, which sometimes not suitable for the system.

Some Popular RTOS

  • Deos (DDC-I)
  • embOS (SEGGER)
  • FreeRTOS (Amazon)
  • Integrity (Green Hills Software)
  • Keil RTX (ARM)
  • LynxOS (Lynx Software Technologies)
  • MQX (Philips NXP / Freescale)
  • Nucleus (Mentor Graphics)
  • Neutrino (BlackBerry)
  • PikeOS (Sysgo)
  • SafeRTOS (Wittenstein)
  • ThreadX (Microsoft Express Logic)
  • µC/OS (Micrium)
  • VxWorks (Wind River)
  • Zephyr (Linux Foundation)

Summary

  • RTOS is an operating system intended to serve real time application that process data as it comes in, mostly without buffer delay.
  • It offers priority-based scheduling, which allows you to separate analytical processing from non-critical processing.
  • Important components of RTOS system are: 1)The Scheduler, 2) Symmetric Multiprocessing, 3) Function Library, 4) Memory Management, 5) Fast dispatch latency, and 6) User-defined data objects and classes
  • Three types of RTOS are 1) Hard time 2) Soft time ,and 3) Firm time
  • RTOS system occupy very less memory and consume fewer resources
  • Performance is the most important factor required to be considered while selecting for a RTOS.
  • General-Purpose Operating System (GPOS) is used for desktop PC and laptop while Real-Time Operating System (RTOS) only applied to the embedded application.
  • Real-time systems are used in Airlines reservation system, Air traffic control system,etc.
  • The biggest drawback of RTOS is that the system only concentrates on a few tasks.

is a collection of correlated information which is recorded on secondary or non-volatile storage like magnetic disks, optical disks, and tapes. It is a method of data collection that is used as a medium for giving input and receiving output from that program.

In general, a file is a sequence of bits, bytes, or records whose meaning is defined by the file creator and user. Every File has a logical location where they are located for storage and retrieval.

Leave a comment

Blog at WordPress.com.

Up ↑

Design a site like this with WordPress.com
Get started