RTOS: what is a real time operating system

embedded pcb circuits

A few days ago I made an introduction about STRs, an operating system for robots, although it is not exactly an OS as it is understood in computing, but rather a framework for robotics developers. Now it's the turn of RTOS extension, which is not an operating system either, but rather a very particular type of operating system.

These operating systems are very important for embedded or embedded devices of small capacity, since they are usually managed by them. In addition, they are also important in industrial applications, for the control of many processes.

What is an RTOS?

Un RTOS (Real-Time Operating System) It is, as its name suggests, a real-time operating system. This differs from time-sharing operating systems in that you work in an environment where output results are known based on system inputs, and occur at a known time. Therefore, they are more predictable and stable to control specific tasks, and the processes usually reside permanently in memory (in timesharing processes, the scheduler loads and unloads from main memory as needed).

By example, imagine an RTOS used for an industrial machine on an assembly line. It would be in charge of executing a software to drill parts from time to time. If the operating system's scheduler did not work in real time, it is likely that it would run at odd times, which would cause the drilling to not be done on time... Being real time, the RTOS can finish the execution of the program in X time and repeat its execution to perform all the drilling on time.

Of course, being an operating system, it also shares the fundamentals of any other OS, that is, it is a system capable of manage the hardware and provide a series of services to apps.

Types of RTOS

Several type real-time operating systems or RTOS:

  • Hard Real-Time: It is a strict real-time operating system, where its processes must be executed at a specific time.
  • Soft RealTime: a flexible real time, where when executing the processes almost negligible instants can be lost sometimes, that is, it is not as strict as the previous one. In addition, they are designed so that these time courses are increasingly smaller.
  • Firm Real Time: Firm real-time SSOOs are another type in which time can be lost, but late responses would not be valid.

Applications of an RTOS

An RTOS is a simple, lightweight system used for limited or simple systems, such as embedded devices. This makes them perfect for applications on the table:

  • industrial control.
  • Telephone switching.
  • Flight control.
  • Simulations in real time.
  • military applications.
  • Home appliances.
  • Basic consumer electronics devices.
  • Robots
  • Etc

Characteristics of the RTOS

RTOS have a number of particularities which are what give them those advantages over the rest for those simple management tasks. To understand them better, it is necessary to know a series of basic concepts:

  • process or task: is a subprogram that runs in parallel with the RTOS. This process can perform many tasks, from controlling a peripheral to performing other actions.
  • Work: This is the name given to the time it takes to execute a process.
  • Planner: the RTOS scheduler allows you to manage the priorities and times of the executed processes. And there are two main types:
    • Cooperative: calls the highest priority processes first and when the process ends it calls another one or, if the process takes longer than expected, kills it and calls the next one.
    • expropriative: From time to time it automatically calls a process, but this could lead to errors due to poor priority in the processes or dependencies. To avoid these problems, the concept of semaphores is introduced.
  • Traffic lights: they work in a similar way to the traffic ones, controlling when a process is in process and paralyzing the entry of the rest of the processes and, when it leaves the resources free, it gives the "green light" for the next one to enter. Some RTOSes have multiple semaphores, each specific to a shared resource.
  • Drives: they are used to communicate between processes, as a buffer, for example for temporary data storage or when there are several elements that return data to a single receiver.
  • Interruptions: they work like those of time-sharing operating systems, but in an RTOS there are some peculiarities. These types of interrupts are used for time management by a controller.

Examples of RTOS

If you wonder what RTOS operating systems exist, the truth is that there are a large number, both proprietary and open source:

  • Arm OS: an operating system designed for Cortex-M, Cortex-R, Cortex-A, and licensed under the Apache 2.0 license.
  • eCos: under modified GNU GPL license, it is another open source operating system for ARM-XScale-Cortex-M, CalmRISC, 680×0-ColdFire, fr30, FR-V, H8, IA-32, MIPS, MN10300, OpenRISC, PowerPC , SPARC, SuperH, and V8xx.
  • emboss: is a proprietary RTOS system, for IoT and embedded applications with ARM7/9/11, ARM Cortex-A/R/M, AVR, AVR32, C16x, CR16C, ColdFire, H8, HCS12, M16C, M32C, MSP430, NIOS2 architectures , PIC18/24/32, R32C, R8C, RISC-V, RL78, RH850, RX100/200/600/700, RZ, SH2A, STM8, ST7, V850, 78K0, and 8051.
  • FreeRTOS: under MIT open-source license, it is intended for embedded with ARM, AVR, AVR32, ColdFire, ESP32, HCS12, IA-32, Cortex-M3-M4-M7, Infineon XMC4000, MicroBlaze, MSP430, PIC, PIC32, Renesas architectures H8/S, RISC-V, RX100-200-600-700, 8052, STM32, TriCore, and EFM32.
  • Fuchsia: It is the famous open source system created by Google and designed to work on both x86-64 and ARM64.
  • Hummingbirds: an RTOS system for x86 under the free GNU GPL license.
  • lynxOS: another RTOS, but this one proprietary, and for architectures as disparate as Motorola 68010, x86/IA-32, ARM, Freescale PowerPC, PowerPC 970, and LEON. In addition, it is POSIX certified.
  • Neutrino: a proprietary real-time system for ARM, MIPS, PPC, SH, x86, and XScale.
  • Phoenix-RTOS: under a permissive BSD license, with support for ARMv7 Cortex-M, ARMv7 Cortex-A, IA-32, and RISC-V architectures.
  • QNX: owns, and was very popular. It is designed to support x86-64, ARM32, ARM64, and earlier MIPS, PowerPC, SH-4, StrongARM, XScale.
  • Linux: Although generally used in timesharing mode, the kernel can also work as an approximation to an RTOS for embedded.
  • Windows CE y Windows 10 IoT: Microsoft also has these real-time versions of its proprietary operating system.
  • zephyr: under the Apache 2.0 license there is also this other open source RTOS for ARM (Cortex-M, Cortex-R and Cortex-A Series), x86, x86-64, ARC, RISC-V, Nios II, Xtensa, and SPARC .

Be the first to comment

Leave a Comment

Your email address will not be published. Required fields are marked with *



  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.