
Real-Time Operating Systems (RTOS) are operating systems that manage hardware resources, support applications, and handle data in real-time. They define the processing time for real-time tasks, interrupt latency, and the reliability of hardware and applications, which is particularly important for low-power, memory-constrained devices and the networks/systems that rely on them. The key difference between RTOS and general-purpose operating systems is that RTOS provides high reliability and consistency in the timing of task acceptance and completion.
Author Profile: Peng Yu, senior engineer, technical advisor at Shanghai Industrial Automation Instrumentation Research Institute, honorary chairman of PLCopen China, expert in the Ministry of Industry and Information Technology’s intelligent manufacturing standardization working group, and expert consultant for the National Intelligent Manufacturing Standardization Coordination Promotion Group.*This article is authorized to be published by Industrial Control Forum
Soft Real-Time, Hard Real-Time
and the Basic Concepts of Determinism
In a document published by Microsoft in 1995 titled “Real-Time Systems and Microsoft Windows NT”, a hard real-time operating system is defined as one that must respond to an event without failure within a specified time interval, with a predictable response that is unaffected by other activities undertaken by the operating system. This shows that hard real-time systems must continuously operate on their data or events within the predetermined time intervals. In contrast, soft real-time systems only operate on their data or events in a timely manner on average, without considering delays caused by deferred procedure calls (DPC) interruptions.
By this definition, it is clear that Windows NT is not a hard real-time operating system. NT cannot guarantee control determinism, and its soft real-time nature makes it difficult to ensure effective execution of control applications. It has the following shortcomings for real-time control: too few thread priorities; opaque and non-deterministic scheduling decisions; potential for priority inversion, especially during interrupt handling, which can leave high-priority tasks waiting.
Introducing the concepts of hard real-time and soft real-time into industrial control systems, the complete expression should be: in a hard real-time system, every event must be responded to, and from the start of the event to the completion of task execution, it must occur within a bounded time period (see the upper part of Figure 1); in a soft real-time system, some events may not trigger task execution and may be lost, and it cannot guarantee that the time required for task execution occurs within a bounded time period (see the lower part of Figure 1). Clearly, without the support of a hard real-time environment, the controller in Figure 1 is in an unstable state, and its control quality is difficult to accept. Therefore, the hard real-time characteristics of the operating system are key factors affecting the determinism of the control system.

Figure 1 Example of the differences in handling periodic real-time control tasks between hard real-time and soft real-time
The Necessity of Using Real-Time Operating Systems

Figure 2 Basic Components of Real-Time Operating Systems
① Effectively manage increasingly complex system resources;
② Virtualize hardware, freeing developers from the need to port and maintain drivers;
③ Provide library functions, drivers, toolsets, and applications.
Choosing a Real-Time Operating System
Overview of Domestic Real-Time Operating Systems

Figure 3 Technical Architecture of ReWorks
Real-Time Operating Systems Used in the Industrial Internet
Embedded systems, real-time operating systems, and the Internet of Things are strongly related, as real-time operating system solutions are a fundamental component for constructing embedded systems for consumer products and industrial Internet of Things (IIoT) asset devices, systems, and processes. Thus, embedded real-time operating systems are core factors in deploying mission-critical, ultra-reliable industrial IoT applications across various industries (including industrial equipment, automotive, healthcare, telecommunications, government solutions, etc.). This is especially true in industrial automation processes and manufacturing devices and equipment like smart machines and robots. According to a report released by Global Market Insights in September 2019, the increasing popularity of real-time operating systems (RTOS) in IoT applications is one of the driving factors for expected growth in the industry. More specifically, the market value exceeded $12 billion in 2019. The research company expects an annual growth rate of over 6% from 2019 to 2025. Analysts from Global Market Insights also confirm that advanced real-time operating system options allow developers to build smaller IoT devices without compromising performance or safety.
Real-time operating systems existed long before IoT devices appeared, so feasibility studies for real-time operating systems for IoT applications began as early as 2016, with some common misconceptions emerging, such as that IoT electronic products do not require real-time operating frameworks, or that polling loop architectures could also meet the requirements. However, it quickly moved away from these traps, and many companies now provide real-time operating systems for IoT devices, with some teams collaborating to improve existing real-time operating systems.
For example, the Zephyr project, hosted by the Linux Foundation, is building a real-time operating system for IoT tools; it is an open-source, community-driven effort focused on innovation. Additionally, Wind River also has a product called VxWorks, which is another real-time operating system for IoT. IntervalZero is another provider offering real-time frameworks designed for IoT. Amazon has a real-time operating system brand, Amazon FreeRTOS. Microsoft also acquired Express Logic in 2019, which developed an industrial-grade ThreadX real-time operating system. It later evolved into the Azure RTOS embedded development suite, including Azure RTOS ThreadX, FileX, GUIX Studio and GUIX, TraceX, NetX, NetX Duo, USBX. This is a small but powerful operating system that provides reliable, ultra-fast performance for resource-constrained devices. It is easy to use and market-validated, having been deployed in over 10 billion devices worldwide. Azure RTOS supports the most popular 32-bit microcontrollers and embedded development tools. Azure RTOS has achieved IEC61508 SIL4 functional safety certification and has been applied in safety-critical products in fields such as avionics, medical devices, transportation, and industrial control equipment. Huawei’s LightOS is also a very good real-time operating system for IoT (see Figure 4), LightOS can also be used for 5G networks. The absence of 5G in this figure is due to the earlier drawing.

Figure 4 Huawei’s IoT Real-Time Operating System LightOS
As people begin to explore how real-time operating systems can empower the IoT, opportunities arise to collect or use data in new ways.This outcome benefits the entire IoT industry, not just the machines and devices using real-time operating systems. When choosing a company to provide real-time operating systems for IoT devices, it is often desirable to understand which real-time operating systems can enhance their performance in developing IoT designs, as real-time operating systems play a vital role in the functionality of connected devices and the capabilities of the systems. Among these, information security and functional safety issues must be prioritized.
For instance, in July 2019, Wind River announced 11 vulnerabilities related to the VxWorks real-time operating system; although they released a patch to fix it, the unsettling fact is that around 200 million devices were running this flawed version of the operating system when the vulnerabilities were discovered. Another Micro-Electro-Mechanical Systems (MEMS) are key components in various embedded devices, systems, solutions, and applications across almost all vertical industries.It is a tiny integrated device or system that combines mechanical and electrical components, consisting of a central unit (microprocessor) that processes data and several parts that interact with the surrounding environment (such as micro-sensors). By perceiving, controlling, and driving at a micro scale and impacting at a macro scale, MEMS provide benefits for enterprises using IoT. The real-time operating systems suitable for MEMS applications should also be a consideration.
As people begin to explore how real-time operating systems can empower the IoT, opportunities arise to collect or use data in new ways. This outcome benefits the entire IoT industry, not just the machines and devices using real-time operating systems. When choosing a company to provide real-time operating systems for IoT devices, it is often desirable to understand which real-time operating systems can enhance their performance in developing IoT designs, as real-time operating systems play a vital role in the functionality of connected devices and the capabilities of the systems. Among these, information security and functional safety issues must be prioritized. For instance, in July 2019, Wind River announced 11 vulnerabilities related to the VxWorks real-time operating system, although they released a patch to fix it, the unsettling fact is that around 200 million devices were running this flawed version of the operating system when the vulnerabilities were discovered. Additionally, Micro-Electro-Mechanical Systems (MEMS) are key components in various embedded devices, systems, solutions, and applications across almost all vertical industries.
Security Issues of Real-Time Operating Systems
As a foundational software, real-time operating systems should also comply with certain software security guarantees. There are various standards for software security certification.Information security standards: The common standard for information technology security assessment is the international standard ISO/IEC15408, which is established for security performance, security assurance, and security assessment. This standard has been recognized by the US government, Canada, and 23 other countries. It divides Evaluation Assurance Levels (EAL) into seven levels. Currently, the highest level of operating systems assessed is EAL6+ (the Integrity-178B real-time operating system from Green Hills Software). Functional safety standards: The industrial software functional safety standard IEC61508-3 divides safety integrity levels (SIL) into four levels (see Table 1). As far as I know, the highest level of operating systems assessed is SIL3 (from Integrity, VxWorks, Canada QNX, etc.). Microsoft claims that its Azure RTOS has obtained IEC61508 SIL 4 functional safety certification but does not specify which organization certified it.

Currently, many real-time operating systems adopt partitioning technology, which places different software parts in protected address spaces, so that when a certain part of the program fails or is compromised, it does not affect the entire system. Green Hills Software’s INTEGRITY real-time operating system has adopted the concept of a separated kernel for 10 years. Figure 5 illustrates the partitioning concept of the INTEGRITY real-time operating system. Its integrated development environment is shown in Figure 6, including Green Hills’ optimized compiler, advanced analysis tools, and target connection.

Figure 5 Partitioning Concept of the INTEGRITY Real-Time Operating System

Figure 6 Integrated Development Environment from Green Hills Software
Partitioned kernel architecture is currently recognized as the only correct method for designing software.It can be used in: ① Many applications requiring guaranteed CPU time and memory; ② Safely connecting any device in a simple manner. Operating systems that also adopt partitioning technology can be divided into: single-kernel partitioning technology and multi-kernel partitioning technology.
The security issues of open-source embedded operating systems. Since μCOSⅡ is an open-source real-time operating system, it is widely used domestically.There is no material available regarding the security certification of μCOSⅡ, so it is impossible to comment overall. The only feasible method is for whoever adopts a tailored μCOSⅡ in embedded systems according to their needs, to conduct a self-assessment based on the IEC61508-3 V&V method when SIL level certification is needed, and then find a qualified third party for V&V certification.
The International Intelligent Manufacturing Forum will be held in Hangzhou

▼Click “Read Original” 【Quick Online Registration】