
01
What is a Real-Time Operating System (RTOS)?
A Real-Time Operating System (RTOS) is an operating system designed to serve real-time applications. Such operating systems can quickly respond to and process data, with processing time requirements measured in increments of 0.1 seconds. The results must be able to control production processes or respond quickly to processing systems within a specified time frame, scheduling all available resources to complete real-time tasks while ensuring all real-time tasks operate in a coordinated manner.

▲Components of RTOS
Compared to general-purpose time-sharing operating systems (such as Linux, Windows, Unix, etc.), RTOS has characteristics specifically suited for embedded applications, including time-slice scheduling and preemptive kernels, with interrupt latencies that can reach microsecond levels.
RTOS can be categorized into three main types based on task timeliness: hard real-time, firm real-time, and soft real-time.
1. Hard Real-Time
In hard real-time operating systems, tasks have high real-time requirements, meaning that designated tasks must be executed and completed within the planned time frame.
Examples: Medical intensive care systems, aviation systems, etc.
2. Firm Real-Time
In this type of RTOS, tasks also need to be completed within the planned time. While exceeding the time limit may not cause significant issues, it can affect the user experience.
Examples: Various multimedia applications.
3. Soft Real-Time
In soft real-time RTOS, tasks have deadlines but can tolerate slight delays. This type of RTOS can flexibly define deadlines based on task priority.
Examples: Online trading systems, livestock pricing systems.
The key difference between hard real-time and soft real-time is that soft real-time can only provide statistical real-time guarantees. For instance, some applications require the system to ensure that a certain action is completed within the specified time 95% of the time, rather than 100%. For example, when operating a DVD player, a normal playback rate of 98% is generally sufficient to meet user needs. However, for applications such as satellite launches or nuclear reactor control systems, the real-time requirements must be 100%, with no room for error.
Hard real-time systems have rigid, unchangeable time constraints, allowing no errors beyond the time limit. Timeout errors can cause damage or even lead to system failure or prevent the system from achieving its intended goals; soft real-time systems have relatively flexible deadlines and can tolerate occasional timeout errors.
02
Why Use RTOS?
RTOS has the following advantages:
1. RTOS schedules tasks based on priority, prioritizing more important processes;
2. RTOS provides API (Application Programming Interface) functionality, making application code more concise;
3. Abstracting timing dependencies and task-based design reduces inter-module dependencies;
4. RTOS offers task-based modular development, allowing for task-based modular testing;
5. The task-based API model is modular, clarifying team responsibilities;
6. RTOS is event-driven, preventing performance waste.
Does this mean RTOS can replace time-sharing operating systems? The answer will be provided at the end.
03
Automotive Software RTOS
In the current environment, a revolution is occurring in the structure of automotive electronic and electrical systems, with a staggering increase in the number and types of software used in vehicles, posing significant challenges for automotive embedded software. The embedded real-time operating system—RTOS—is widely used in automotive software.
A basic term in automotive software RTOS is ‘task,’ which can be simply described as ‘a collection of related tasks that can jointly provide certain system functions.’ Ordinary computers can perform many operations simultaneously, meaning they can handle multiple tasks, while embedded computers are typically designed to do one thing, such as the Vehicle Control Unit (VCU), Electronic Control Unit (ECU), Transmission Control Unit (TCU), and Body Control Module (BCM) in the automotive field.
Tasks are semi-independent program segments with specific purposes, and most real-time applications in vehicles require multiple tasks to run. Automotive software RTOS provides concurrent and asynchronous execution of tasks, scheduling the order of task execution in vehicles, and entering an idle state when the application is not active.
Additionally, other basic terms related to RTOS include:
-
Job—A small portion of work that can be assigned to a processor, which may or may not require resources;
-
Job Release Time—The point in time when a job is ready to execute;
-
Job Execution Time—The duration it takes to complete the execution of a job;
-
Job Deadline—The point in time by which a job should be completed;
-
Processor—Also known as active resources, which are crucial for executing work;
-
Maximum Job Time—The allowed response time for a job, also known as relative deadline;
-
Job Response Time—The length of time from job release to completion;
-
Absolute Deadline—The relative deadline of a job, including its release time.
04
Applications of RTOS
RTOS possesses characteristics such as constraints, reliability, and predictability, and can be applied in the following fields/products beyond the automotive sector:
-
Airline reservation systems;
-
Air traffic control systems;
-
Real-time update systems;
-
Real-time stock monitoring systems;
-
Defense application systems, such as radar;
-
Network multimedia systems;
-
Command control systems;
-
VoIP (Voice over Internet Protocol);
-
Anti-lock braking systems;
-
Pacemakers.
05
Disadvantages of RTOS
The disadvantages of RTOS include:
-
RTOS can continuously run time-slice-based tasks but may spend excessive time on applications with errors.
-
RTOS can only focus on a limited number of tasks, making multitasking difficult;
-
RTOS requires specific drivers to provide quick response times to interrupt signals, maintaining operational speed;
-
RTOS uses a lot of resources, making system costs high;
-
Low-priority tasks experience long wait times because RTOS must ensure the accuracy of executing programs;
-
Frequent task switching affects task execution efficiency;
-
Complex algorithms used are difficult to understand;
-
Excessive use of unnecessary system resources.
Returning to the question posed in the second section, the answer is clear. The design philosophy and application domains of real-time operating systems and time-sharing operating systems are fundamentally different, each with its advantages and disadvantages. They do not replace each other but rather complement one another.
For more RTOS-related content, feel free to click to view details or visit www.digiproto.com for more information!
References
[1]Reference link: https://www.guru99.com/real-time-operating-system.html
END
Recommended Reading


Product Introduction




DigiProto Software is a leading provider of embedded digital prototypes in China, with the mission of “empowering the leap of China’s high-end equipment manufacturing industry” and aims to “become a world-class basic software supplier.”
