This article is approximately 7097 words and takes 8 minutes to read
A Real-Time Operating System (RTOS) is an operating system that manages hardware resources in real-time, supports applications, and processes data. It defines the timing for real-time task processing, interrupt latency, and the reliability of hardware and applications, which is particularly important for low-power, memory-constrained devices and the networks/systems that depend on them. The key difference between an RTOS and a general-purpose operating system is that an RTOS provides high reliability and consistency in the timing of task acceptance and completion.
1Basic Concepts of Soft Real-Time, Hard Real-Time, and Determinism
In a paper published by Microsoft in 1995 titled “Real-Time Systems and Microsoft Windows NT,” a hard real-time operating system is defined as follows: a hard real-time operating system “must respond to an event without failure within a specified time interval, and this response must be predictable and unaffected by other activities undertaken by the operating system.” Thus, it is evident that a hard real-time system must continuously operate on its data or events within a predetermined time interval. In contrast, a soft real-time system operates on its data or events in a timed manner only in an average sense, without regard to delays caused by Deferred Procedure Calls (DPC) interruptions.
According to 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 the effective execution of control applications. It has the following shortcomings for real-time control: too few thread priorities; opaque and non-deterministic scheduling decisions; and the potential for priority inversion, especially during interrupt handling, which can leave high-priority tasks waiting.
When introducing the concepts of hard real-time and soft real-time into industrial control systems, the complete statement should be: in a hard real-time system, every event must be responded to, and the time from event initiation to task execution completion must always 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 there is no guarantee that the time required for task execution will occur 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 a key factor 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 performance and determinism of a computer are not equivalent concepts. The performance of a computer is the ability of a processor to complete effective work. Generally speaking, better performance indicates that more instructions can be processed within a certain time period, and it is usually believed that increasing execution speed (i.e., increasing the processor’s main clock frequency) can improve performance. Event wait time is a measure of a system’s ability to respond to an asynchronous event. The event wait time of a system is closely related to determinism. It is related to the sum of the time it takes for the CPU to respond to interrupts and gain control of the bus, as well as the system’s ability to change the CPU’s state to the interrupt handler.
Having clarified the concepts of hard real-time, soft real-time, and control determinism, it can be concluded that the scheduling of hard real-time systems is predetermined, so each task is guaranteed to start execution from the response to external events within a precise time limit and to complete program execution within a determined time interval. Therefore, hard real-time systems are deterministic on a time scale. Soft real-time systems are typically considered based on the average length of the starting routine, and thus inevitably experience waiting times constrained by other factors, making the execution time of the program difficult to determine. It can thus be concluded that applications with strict determinism requirements must choose hard real-time operating systems with deterministic characteristics.
Another way to express this is that time is the key parameter distinguishing hard real-time from soft real-time. In hard real-time systems, the timeline serves as a criterion that must be followed under any circumstances. Hard real-time systems do not use any type of permanent memory, so their processes must complete correctly on the first execution, meaning they must respond accurately to events within a specified time. This hard predetermined time is generally on the order of milliseconds. Furthermore, hard real-time systems typically have small or medium-sized data files, so the requirements for data integrity are simpler than for large data files. Examples of hard real-time systems include flight control systems, air traffic control systems, aircraft autopilot systems, missile guidance systems, anti-missile systems, nuclear reactor control systems, railway signaling systems, electronic medical device systems, pacemakers, industrial control systems, and motion control systems.
2The Necessity of Using Real-Time Operating Systems
A Real-Time Operating System (RTOS) serves as the foundation and development platform for both embedded and non-embedded applications. During the development phase, an RTOS makes the development work easier and more efficient; during the operational phase, it automatically executes software programs, performs operations on time, and can automatically respond to external events.
From the perspective of more effectively applying software to execute tasks, there are ample reasons to adopt a real-time operating system. This is because RTOS provides priority-based scheduling, allowing us to separate non-critical processing tasks from critical processing tasks; RTOS provides API functions that allow us to develop clearer and smaller application code; abstracting time-critical, task-based designs reduces interdependencies between software modules; RTOS offers modular task-based development, facilitating testing of modular tasks; task-based APIs promote modular development of tasks, which typically results in clearly defined functions for tasks within the system, allowing teams to work independently on their respective parts of the project; RTOS is event-driven and does not waste time on processing caused by untriggered events.
A real-time operating system consists of the following components (see Figure 2): Scheduler determines the order of task execution based on priority; Symmetric Multiprocessing allows the real-time operating system to handle multiple different tasks in parallel; Function Library provides an interface for users to connect with the RTOS kernel and application code, allowing users to send requests to the kernel using the function library to obtain the desired results; Memory Management allocates memory space for each program, which is the most important part of the RTOS; Fast Scheduling Latency is the interval between the termination of a task recognized by the operating system and the actual time spent by the thread in the ready queue that has begun processing; User-defined Data Objects and Classes are organized according to their operations using programming languages such as C and C++.

Figure 2 Basic Components of a Real-Time Operating System
As the core of system software, the main functions of embedded operating systems are as follows:
① Effectively manage increasingly complex system resources;
② Virtualize hardware, freeing developers from the burden of driver porting and maintenance;
③ Provide library functions, drivers, toolsets, and applications.
Real-time operating systems generally have the following characteristics: they occupy very little memory, such as the extremely small kernel of VxWorks; consume fewer resources; have strong real-time capabilities, such as VxWorks responding to external events in ≤1mS; have highly predictable response times to events; can operate in unpredictable environments; the kernel saves the state of interrupted tasks and determines which task should run next; the kernel restores the state of interrupted tasks and hands control back to the CPU. As embedded devices become increasingly powerful and complex, the development of systems increasingly relies on operating systems, making the operating system an indispensable part of embedded systems.
3Choosing a Real-Time Operating System
Unlike the limited variety of operating systems available for PCs, there are nearly 200 real-time operating systems available for embedded systems, and the differences between each operating system are often subtle and difficult to grasp. We can distinguish the differences between various operating systems based on performance and knowledge regarding scheduling algorithms, signaling characteristics, memory requirements, wait times, tool support, and pricing models.
When selecting a real-time operating system, the following factors can be considered. First is performance, which is the most important factor to consider when choosing an RTOS, and it should be reasonably considered based on the usage scenario and scope. For example, the maximum number of tasks executed simultaneously; choosing too many wastes resources, while choosing too few may not be sufficient. Middleware, if there is no middleware support in the real-time operating system, there will be issues with process integration time. It is advisable to select a well-reviewed RTOS system that has been proven in practice to avoid errors during task execution. Generally speaking, embedded systems have limited resources, and the small program size of real-time operating systems makes them particularly suitable for widespread use in embedded systems. Additionally, users prefer real-time operating systems with minimal task switching time, ensuring that real-time performance remains good during task transitions. Unique features: a good RTOS should also have additional features, such as how to execute commands and effectively protect system memory. 24/7 performance: RTOS is essential for applications that require continuous operation 24 hours a day.
Choosing an RTOS that is perfectly suited for embedded products is not an easy task. Currently, commonly used hard real-time operating systems include: Windows CE (versions 6.0/7.0 and above), VxWorks (acquired by Intel), pSOS, Ventur Com ETS 10.1, Ventur Com RTX 5.1 for Windows NT, 2000, XP, OSE (Enea, Sweden), etc. For larger applications, Windows NT embedding with a real-time operating system kernel, referred to as NTe, can also be used. Additionally, Linux operating systems suitable for embedded systems are open-source, and there are some real-time Linux operating systems, such as OSADL from the Austrian Open Source Automation Development Lab; another example is integrating a dedicated real-time kernel, Cobalt, into the Linux main kernel, and using the PREEMPT_RT patch in combination with the Cobalt kernel, allowing real-time tasks scheduled by Cobalt to be created by periodic Linux tasks.
According to a 2014 market survey of embedded OS, the top eight real-time operating systems are: INTEGRITY from Green Hills Software, VxWorks from WindRiver, QNX Neutrino, FreeRTOS, Micrium’s µC/OS-II, III, Windows CE, TI-RTOS Kernel (formerly DSP/BIOS), and RTEMS, an open-source RTOS designed for embedded systems, primarily used in missiles and space probes.
4
Overview of Domestic Real-Time Operating Systems
Domestic real-time operating systems include ReWorks, developed by the East China Research Institute of Computer Technology based on the introduction and digestion of the VxWorks real-time operating system from Wind River, USA, with the aim of replacing VxWorks in embedded system development. At the same time, all original work results formed on the basis of VxWorks have been ported to ReWorks. The embedded real-time operating system compatible with VxWorks is suitable for various target hardware environments: x86, xScale, PPC, ARM9, etc. It adapts to different system scales: the minimum configuration is less than 100K. The ReWorks/ReDe real-time system development and operating platform includes a development environment that integrates design/development/debugging/simulation, as well as real-time middleware. Figure 3 shows the technical architecture of ReWorks.

Figure 3 Technical Architecture of ReWorks
Recently, Yihui Company has rapidly risen in China, developing the original large hard real-time operating system SylixOS, contributing to reducing domestic reliance on foreign embedded operating systems for some critical devices; it also provides a new choice for the development of domestic embedded devices. SylixOS supports symmetric multiprocessing (SMP) scheduling, and according to the evaluation report from the Ministry of Industry and Information Technology, its kernel autonomy rate reaches 100%, possessing fully controllable technical capabilities. SylixOS features real-time processes and dynamic loading mechanisms, meeting the needs of multiple developers for distributed software development, and supports the integration of these applications on the operating system; it supports processors of architectures such as ARM, MIPS, PowerPC, x86, SPARC, DSP, RISC-V, C-SKY, etc., and mainstream domestic general-purpose processors (such as the entire series of Feiteng, Longxin, Zhongtianwei CK810, and the entire series of Zhaoxin), facilitating users in migrating application programs when upgrading hardware platforms, thus reducing the workload of migration; SylixOS can be paired with a dedicated integrated development environment, RealEvo-IDE, and hardware simulator, RealEvo-Simulator, facilitating system development and debugging, accelerating software R&D speed, and shortening product development cycles; it provides optimized drivers for different processors to improve overall system performance. SylixOS complies with IEEE, ISO, and IEC-related operating system programming interface specifications, allowing existing user applications to be easily migrated to SylixOS. SylixOS is an open-source operating system, and to ensure its continuous development and attract a large number of developers to participate in testing, it currently exists as a publicly available source code project.
5Real-Time Operating Systems Used in the Industrial Internet
Embedded systems, real-time operating systems, and the Internet of Things (IoT) are strongly correlated, as real-time operating system solutions are a fundamental component in building embedded systems for consumer products as well as industrial IoT (IIoT) asset devices, systems, and processes. Thus, it is clear that 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, and government solutions). This is especially true in industrial automation processes and manufacturing devices and equipment such as intelligent machines and robots. A report released by Global Market Insights in September 2019 indicated that the increasing prevalence 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 predicts an annual growth rate of over 6% from 2019 to 2025. Analysts at Global Market Insights also confirmed 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 the emergence of IoT devices, so feasibility studies for real-time operating systems for IoT applications began as early as 2016, with some common assumptions emerging, such as IoT electronic products not needing a real-time operating framework, or that polling loop architectures could also meet 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 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. This later evolved into the Azure RTOS embedded development suite, including Azure RTOS ThreadX, FileX, GUIX Studio and GUIX, TraceX, NetX, NetX Duo, and 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 has been market-validated, 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 IoT real-time operating system (see Figure 4), LightOS can also be used in 5G networks; the absence of 5G in this figure is due to the earlier date of the illustration.

Figure 4 Huawei’s IoT Real-Time Operating System LightOS
As people begin to take an interest in 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 selecting companies to provide real-time operating systems for IoT devices, there may be a greater desire to understand which real-time operating systems can enhance their performance in developing IoT designs, as real-time operating systems play a crucial role in the functionality of connected devices and systems. Among these, information security and functional safety issues must be prioritized. For example, in July 2019, Wind River announced 11 vulnerabilities related to the VxWorks real-time operating system; although they released a patch to fix them, 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.They are tiny integrated devices or systems that combine mechanical and electrical components.They consist of a central unit (microprocessor) that processes data and several parts that interact with the surrounding environment (such as micro-sensors).MEMS provide benefits to businesses utilizing the IoT through their ability to sense, control, and drive at a microscopic scale, as well as their ability to have an impact at a macroscopic scale.Real-time operating systems suitable for MEMS applications should also be a consideration.As people begin to take an interest in 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 selecting companies to provide real-time operating systems for IoT devices, there may be a greater desire to understand which real-time operating systems can enhance their performance in developing IoT designs, as real-time operating systems play a crucial role in the functionality of connected devices and systems.Among these, information security and functional safety issues must be prioritized.For example, in July 2019, Wind River announced 11 vulnerabilities related to the VxWorks real-time operating system; although they released a patch to fix them, 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.
6Security 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 Criteria for Information Technology Security Evaluation is an international standard ISO/IEC15408 established for security performance, security assurance, and security evaluation, recognized by the US government, Canada, and 23 other countries. It divides Evaluation Assurance Level (EAL) into 7 levels. The highest level currently certified for operating systems is EAL6+ (Integrity-178B real-time operating system from Green Hills). Functional safety standards: The industrial software functional safety standard IEC61508-3 divides safety integrity levels (SIL) into 4 levels (see Table 1). As far as I know, the highest level currently certified for operating systems is SIL3 (from Integrity, VxWorks, QNX, etc.). SIL3 is considered the highest level of risk reduction in a single programmable system. Microsoft claims that its Azure RTOS has achieved 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 if a part of the program encounters an error 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 shows the partitioning concept of the INTEGRITY real-time operating system. Its integrated development environment is shown in Figure 6, which includes 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
The partitioned kernel architecture is currently recognized as the only correct method for designing software. It can be used in:① Many applications that require 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.
Security issues of open-source embedded operating systems. Since μCOS-II is an open-source real-time operating system, it is widely used domestically. However, there is no available material on the security certification of μCOS-II, so it is impossible to comment on it overall. The only feasible method is for those who have adopted a customized version of μCOS-II in embedded systems to conduct their own evaluations according to IEC61508-3’s V&V methods when SIL level certification is required, and then seek qualified third-party V&V certification.

Author Biography
Peng Yu, professor-level senior engineer, technical consultant at the Shanghai Institute of Industrial Automation Instrumentation, honorary chairman of PLCopen China, expert in the Ministry of Industry and Information Technology’s intelligent manufacturing standardization system construction working group, and expert consultant for the National Intelligent Manufacturing Standardization Coordination Promotion Group.
More Articles
-
Sun Bailin: Development Strategies for Enterprises in the Digital Age
-
Peng Yu: Insights on the Potential of PC Control from the History of PC Control Development
-
Peng Yu: A Discussion on Automatic Control and Overlooked Industrial Software
-
Peng Yu: Milestones in the Development of Industrial Automation Technology Over 75 Years
-
Peng Yu: Current Status and Trends of PLC Programming Languages and Platforms from a User Survey
-
Peng Yu: Methods for Software-Defined Motion Control (Complete Video and PPT)
-
Peng Yu and He Yanqing: Trends in Motion Control Systems
-
Professor Peng Yu Commemorates the Father of PLC: Always Carrying the Spirit of Innovation and Progress
-
Peng Yu: Typical Cases of OT and IT Integration
-
Peng Yu: Fundamental Issues in OT and IT Integration
-
Peng Yu: Edge Programmable Controllers as Tools for OT-IT Integration
-
Peng Yu: Practical Progress of Containerization Technology in Industrial Automation Applications
-
Tian Feng: Strange Phenomena and Misconceptions in Enterprise Simulation
-
Qian Xiujuan: The Digital Marketing Path for Industrial Control Enterprises
-
Fang Yuanbai: Career Planning for Control Engineers
-
Fang Yuanbai: What are the Development Trends of Long-standing Local Pressure Gauges?
-
Fang Yuanbai: The Best Suppliers in the Process Control Field According to the 2020 Control Magazine List
-
Fang Yuanbai: Contributions of Industrial Control Personnel in the Fight Against the Pandemic
-
Fang Yuanbai: The Past and Present of Emerson Rosemount Pressure Transmitters
-
Fang Yuanbai: Development Trends of Pressure Transmitters from the Perspective of Emerson Rosemount’s Third Generation Products
-
Chen Bing: An Incomplete Version of Major Events in the Early Development of PLC (1968-1994)
-
Du Pinsheng: Is the Automatic Control System the “Egg” or “Stone” of Intelligent Manufacturing?
-
Dr. Xiaowei Bie Talks About Mechanical Automation
-
Song Huazhen: Discussing Engineer Culture
-
Song Huazhen: Talking About Predictive Maintenance
-
Gongkong Founder Sun Huixin: My Industrial Control Network Story
-
Deng Li: How to Write High-Quality PLC/PAC Programs?
-
Teacher Deng Li Talks About PAC Programming: The More Advanced the System, the Simpler the Programming
-
Zhou Zhou: Starting PLC Programming from Making Excel Sheets
-
Zhou Zhou: The Higher-End the Electrical Engineer, the Bigger the Pit to Fill?
-
Zhou Zhou: A Brief Discussion on New Media in the Industrial Control Industry (Recommended Companies and Media Exhibition References)
-
Zhou Zhou: Who are the Mercedes-Benz and BMW in Human-Machine Interfaces?
-
What Exactly is an Industrial APP? What is its Use?
-
From Global Industrial Software Development Patterns to Breakthroughs in Domestic Industrial Software
- “Casting Soul” Author: Why is Chinese Industrial Software Difficult to Revitalize?
-
30 Years Ago, This Lithography Machine Almost Changed the History of Domestic Pressure Sensors!
-
The Current Situation of Industrial Control Network Security is Worrying, How to Prevent?
-
Looking at the Sweet and Sour Experiences of Female Engineers in Industrial Control
-
Ye Hui: When Industrial Robots Meet VR/AR
-
These Days, Non-standard Automation is Not Something Anyone Can Do
-
Inovance Technology Chairman Zhu Xingming’s 2020 New Year Speech, 150 Minutes Complete Video
-
The 3D Virtual Production Line Built in Ten Minutes is So Realistic, No Wonder KUKA Wants to Acquire It!
-
Raspberry Pi DIY Edge Control PLC? This Article Explains It All!
-
How Siemens Acquired a Low-Code Platform for $700 Million, What is the Value Behind It?
-
Technical Experts Provide Six Tips for Rapid Growth of Industrial Control Engineers
-
Xu Bin: Who are the True Heroes in the Digital Age?
-
Guo Ning: How Will 5G Change Industry?
-
Liang Zhibin: An Industrial Safety Accident I Experienced Abroad
-
Liang Zhibin: Software Tools I Often Use [Recommended for Industrial Control Engineers]
-
Yang Zhiqiang: How Can Engineers Avoid “Technical Unemployment”?
-
Yang Zhiqiang: Do Automation Engineers Also Need to be Full-Stack Engineers?
-
Yang Zhiqiang: A Few Tips for Automation Engineers to Transform into Online Instructors