Computer programmer coding closeup

A real-time OS used in various areas. In this article, we will explain the following contents in an easy-to-understand manner for real-time OS beginners.

・What is a real-time OS?
・What is an embedded real-time OS?
・Functions of real-time OS
・Features (advantages) of real-time OS
・Type of real-time OS

What is a real-time operating system (RTOS)?

A real-time OS (Real-Time Operating System, RTOS) is mainly used for embedded systems, and is an OS that focuses on satisfying real-time performance for system requirements.

Embedded systems that require real-time performance include automobiles, medical equipment, industrial control systems, aerospace systems, and military systems.

These specific devices receive not only human operations but also the content detected by sensors as tasks. Strict processing priorities are determined for those tasks, and processing is executed according to those priorities.

Improving and securing real-time performance according to task priority. This is the performance required of a real-time OS.

OS operating system

What is real-time performance?

Real-time performance refers to immediate response performance to requests from the embedded system side.

Real-time performance is emphasized in embedded systems, but the priority of the requirements is significantly different from general-purpose OS.

For example, let's say you have a request to use a macro when organizing data on your computer. Even if this processing time is slightly slowed down, it is not very important because it only increases the discomfort felt by humans and does not lead to serious accidents.

However, assuming a situation where a human is on the trajectory of a robot arm, such as at a manufacturing site, even if the presence of a human is detected, if the robot arm is slow to stop, it could lead to a serious accident.

In other words, real-time performance is critical because it is life-threatening.

Since real-time OSs are mainly used in the latter case, real-time performance for executing high-priority processing is extremely important.

What is an embedded real-time OS?

An embedded real-time OS, as the name suggests, is a real-time OS used in embedded systems.

Unlike a general-purpose OS, it is customized as an OS dedicated to the device to be embedded, and is designed to demonstrate real-time performance within limited resources.

Example of use of embedded real-time OS

Examples of embedded real-time OSs that require real-time performance are as follows.

・Various manufacturing robots for manufacturing sites, etc.
・Robot vacuum cleaner that cleans automatically
・Automobile engine control and brake control such as ABS
・Surgery robots in the medical field
・Building management such as elevators
・Railway systems and automatic ticket gates

In addition to these, it is installed in many devices, and the number of targets continues to increase.

Real-time OS functions

The central function of a real-time OS is a scheduling function that selects tasks to be executed according to a defined priority. This feature is called Task Scheduler.

First of all, the basic structure of the OS, not limited to real-time OS, is that after the device driver receives the operation from the hardware, the kernel controls the operation according to the purpose. The middleware executes processing as it is, and finally runs as an application program for the device.

The task scheduler is a function that the kernel selects a task with high priority in the above OS structure and decides to execute it.

Compare the difference between real-time OS and general-purpose OS

Kernel control differs greatly between a real-time OS and a general-purpose OS used in personal computers.

A general-purpose OS operates to process multiple application software tasks in parallel in the requested order. For example, when working on a computer, you may be working on a document in PowerPoint while executing a macro in Excel.

A general-purpose OS does not prioritize tasks and is designed with priority given to average processing speed.

On the other hand, a real-time OS designed for embedded systems does not execute the requested tasks in order, but rather executes tasks that have the necessary requirements for execution. In addition, according to the priority determined for each task, it may interrupt another task to interrupt another task and change the order of execution.

An easy-to-understand example is automatic braking. When the car is about to collide with someone who jumps out while driving, even if the human requests a task to step on the accelerator, the task of applying the brakes is interrupted when the sensor detects the person.

This is a case where you can easily understand why real-time performance is required for embedded systems.

General-purpose OS table
Real-time OS table

Features and benefits of real-time OS

Real-time OS has the following four features.

Able to perform multitasking
● Tasks can be scheduled according to priority
● Easy to develop with multiple people, easy to develop large-scale and medium-scale
● Small program size and small resources

Laptop and modern concept

Let's discuss these in detail.

Able to multitask

A real-time OS is logically capable of multitasking.

In reality, when there is only one MPU executing a task, only one process is being executed physically. However, if you have multiple tasks, the tasks that are not running are programmatically running. This is called multiprogramming.

One of the features of a real-time OS is the ability to create an environment for parallel operation.

Tasks can be scheduled according to priority

A real-time OS that adopts the event-driven preemption method can schedule tasks according to their priority.

In real-time OS environments, it is difficult to predict when high-priority tasks will occur. Taking the example of automatic braking, it is a case where it is not possible to predict when a person will jump out.

For this reason, the real-time OS is capable of scheduling tasks that are currently being executed by interrupting them with high-priority tasks.

Easy to develop with multiple people, easy to develop large and medium scale

A real-time OS has an independent program for each task, so it has the advantage of being easy to develop with multiple people.

Large-scale development inevitably involves many engineers. One of the bottlenecks in development is who will share the responsibility and to what extent.

In the case of development where the programs are not independent, it is extremely difficult to separate the work, but there is no such problem with a real-time OS where the programs are independent for each task.

Small program size and small resources

A real-time OS has the advantage of using less resources, such as memory, because the range of tasks is limited.

If this is a general-purpose OS, you will need a configuration that supports the process model (process management, interprocess communication, file management, etc.) and a configuration that manages the GUI (network, windows, etc.).

In OS development, which requires real-time performance within small-scale resources, supporting the process model has the disadvantage of impairing real-time performance.

In real-time OS development, it is possible to select unnecessary configurations that have many disadvantages that are not suitable for such development purposes, so resources are smaller than general-purpose OSes.

Types of real-time OS and their characteristics

There are various types and products of real-time OS.

Broadly speaking, there are open-source real-time OSs that can be used free of charge and real-time OSs that are provided for a fee. "Blackberry QNX", for which we act as an agent, is a paid real-time OS.

First of all, open source that can be used free of charge with low initial cost looks attractive at first glance. However, in fact, cases where many companies fail to develop a real-time OS tend to occur when using open source.

Since it is free, there is no dedicated external professional to support it, so it is necessary to develop everything in-house. A real-time OS has the disadvantage of being significantly more difficult to develop because not only advanced technology but also management of the development process is an extremely important element.

Also, we have to be careful about the lack of functions that commercial real-time OSs can do, but open-source real-time OSs can't.

On the other hand, a paid real-time OS incurs costs, but it is easier to develop a real-time OS that meets your objectives than open source because you can receive dedicated support from external professionals.

There are various types and products of real-time OS, but it is necessary to carefully organize the situation and purpose of the company in terms of cost and development difficulty, and decide which real-time OS to adopt.

Introduction of the strengths of "BlackBerry QNX" handled by our company

So far, we have explained the real-time OS, but lastly, I would like to briefly explain the real-time OS"BlackBerry QNX", for which we have contracted domestic distributors, and its strengths.

Please use it as a candidate when choosing a real-time OS.

What is BlackBerry QNX?

Founded in Canada in 1980, QNX has been a real-time OS specialized for the embedded market since announcing the industry's first commercial real-time microkernel OS.

Features such as high reliability, scalable architecture, and low memory requirements continue to make a strong mark in markets such as networking, automotive systems, and industrial automation control.

It is used in the operation of more than 100 million embedded devices, and it is a product with a lot of market results adopted by more than 45 automobile brands.

A brief introduction ends here. If you want to know more about "Blackberry QNX", please refer to our website at the link below. We also have an introduction video in the webinar, so please watch it.

Inquiry

If you have any questions or concerns regarding the content of this article, please feel free to contact us using the form below.