Real-time operating system
More actions
A real-time operating system (RTOS) is an operating system for real-time systems: systems whose results must be logically correct and must also be produced before a set instant called a deadline.[1] The kernel of an RTOS gives tasks a priority discipline, fast context switching, preemption and primitives for handling deadlines, periods and worst-case execution times, usually with a small memory footprint.[1] Real-time embedded systems range from car powertrain controllers to video codecs in DVD players,[1] and widely used kernels such as FreeRTOS target microcontrollers and small microprocessors.[2]
In virtual reality and augmented reality hardware, real-time software can run alongside a general-purpose operating system. Apple describes the Apple Vision Pro as a dual-chip design in which the Apple R1 processes camera, sensor and microphone input and streams new images to the displays within 12 milliseconds, and TechCrunch reported that Apple's visionOS adds a "real-time subsystem" to the core shared with Apple's other operating systems.[3][4] Some smart glasses run RTOS-based firmware instead of a general-purpose operating system such as Android: the firmware of Brilliant Labs Halo is a Zephyr RTOS application.[5] Developer documentation for MentraOS groups the Even Realities G1 and Vuzix Z100 among "RTOS/Firmware-based glasses".[6]
Definition and characteristics
Orozco and Santos, in a 2012 chapter on real-time operating systems for embedded systems, base their definition on a 1988 paper by John Stankovic. In their words, "It is not enough to produce correct logical-arithmetic results"; the results must also be produced before a certain deadline.[1][7] Stankovic's paper set out to define real-time computing and dispel common misconceptions about it, and covered scheduling theory, operating systems, programming languages and fault tolerance among the field's technical issues.[7] Timing requirements are treated as non-functional requirements that matter as much as the functional ones.[1]
Real-time systems are traditionally divided into three classes by the cost of a missed deadline:[1]
| Class | Missed deadlines | Typical use |
|---|---|---|
| Hard | No deadline may be missed | Safety-critical systems[1] |
| Firm | Occasional misses are tolerated if they follow a predefined pattern | Some applications that can absorb an occasional late result[1] |
| Soft | Misses degrade performance without severe consequences | Applications where lateness reduces quality[1] |
An RTOS differs from a common desktop operating system in several ways. In embedded systems the RTOS usually gives direct access to processor registers, program memory and peripherals, which traditional operating systems hide by separating kernel areas from user areas. The kernel provides task dispatching, communication and synchronization, and in embedded systems the operating system is often reduced to these functions. It must be able to preempt a running task as soon as a higher-priority one is ready; in a common design the kernel runs the scheduler and dispatcher on a periodic timer tick, checks the queue of ready tasks and, if needed, replaces the running task with one of higher priority.[1]
Scheduling
Fixed priorities are the most widely accepted priority discipline in RTOS kernels; some kernels implement earliest deadline first (EDF) scheduling instead.[1] The theory behind both goes back to a 1973 paper by C. L. Liu and James W. Layland, who studied single-processor scheduling of program functions that need guaranteed service. They showed that an optimal fixed-priority scheduler has an upper bound on processor utilization that can be as low as 70 percent for large task sets, and that full processor utilization can be achieved by assigning priorities dynamically according to the tasks' current deadlines.[8]
Tasks that share resources introduce priority inversion, in which a high-priority task waits on a resource held by a lower-priority one. Lui Sha, Ragunathan Rajkumar and John Lehoczky analyzed two protocols that solve uncontrolled priority inversion in 1990: basic priority inheritance and the priority ceiling protocol. The priority ceiling protocol limits the worst-case blocking of a task to the execution of a single critical section of a lower-priority task and also prevents deadlocks.[9] A documented field example is the Mars Pathfinder mission, whose flight software ran on Wind River's VxWorks kernel. In a 1997 account of a keynote by Wind River's chief technical officer David Wilner, Mike Jones described how the spacecraft suffered repeated total system resets that were traced to priority inversion, and how engineers fixed the problem in flight by turning on priority inheritance for the mutex involved.[10]
Examples
| RTOS | Origin | Notes |
|---|---|---|
| FreeRTOS | Created in 2003 by Richard Barry[11] | Fixed-priority, tick-driven scheduler with round-robin time slicing among tasks of equal priority.[1] Barry joined Amazon in 2016, and on 29 November 2017 Amazon Web Services released kernel version 10 under the MIT license instead of the earlier modified GPLv2 license.[11] The project describes it as an RTOS for microcontrollers and small microprocessors supporting more than 40 processor architectures.[2] |
| Zephyr | Announced by the Linux Foundation on 17 February 2016[12] | Open source RTOS for Internet of Things devices, aimed at those with the very smallest memory footprints; launched with early support from Intel (including Wind River), NXP, Synopsys and UbiquiOS Technology; the Linux Foundation presented it as a complement to real-time Linux.[12] eeNews Europe reported in October 2020 that Google and Facebook (now Meta Platforms) would work with the project's other Platinum members; both appear on the Platinum member list in October 2026.[13][14] |
| VxWorks | Wind River | Proprietary RTOS with mutual exclusion semaphores that support priority inheritance;[1] used on the Mars Pathfinder mission.[10] |
| eCos | Open source | Configurable from very small memory-constrained system-on-chip devices to larger systems; preemptive scheduling with up to 32 priority levels.[1] |
| LynxOS | Lynx Software Technologies[15] | POSIX-compatible, multiprocess and multithreaded, with a microkernel design and a minimum footprint of 28 KB according to Orozco and Santos.[1] The vendor sells the LynxOS-178 variant as a commercial off-the-shelf RTOS for avionics and other safety-critical systems.[15] |
| MaRTE OS | University of Cantabria, Spain | Hard real-time OS following the Minimal Real-Time POSIX.13 subset; every service, including dynamic memory allocation, has a time-bounded response.[1] |
Use in VR and AR devices
Timing requirements
The authors of ILLIXR, an open source end-to-end extended reality system from the University of Illinois at Urbana-Champaign, argued that the combination of real-time constraints, interacting pipelines and changing algorithms calls for optimization across "the hardware, compiler, operating system, and algorithm".[16] ILLIXR runs on Linux and partly defers scheduling to the Linux scheduler and GPU driver. In its runtime, synchronous components such as visual-inertial odometry (VIO) are not preempted when they miss a deadline, but asynchronous components can lose work: if timewarp takes too long, the display is not updated. The authors found that on their high-end desktop platform the IMU components ran slightly below their target rate "because of scheduling nondeterminism at the 2 ms period required by these components", and that on the lower-power NVIDIA Jetson configurations more components missed their target frame rates: the application and reprojection were severely degraded, and on the low-power configuration individual VIO frames missed their deadlines.[16] The paper reports motion-to-photon latency as one of its end-to-end quality metrics and names scheduling and resource management as research directions for XR systems.[16]
Apple Vision Pro
At the announcement of the Vision Pro on 5 June 2023, Apple said the M2 provides standalone performance while the R1 processes input from 12 cameras, five sensors and six microphones, and that "R1 streams new images to the displays within 12 milliseconds". Apple also said visionOS was designed "to support the low-latency requirements of spatial computing".[3] Apple's current specification page, for the M5 model, lists the R1 with "12-millisecond photon-to-photon latency" and 256GB/s of memory bandwidth.[17]
TechCrunch reported that visionOS shares core components with macOS, iPadOS and iOS and adds a "real-time subsystem" for processing interactive visuals.[4] Ben Thompson of Stratechery quoted Mike Rockwell describing "a new real-time execution engine that guarantees performance-critical workloads" and argued that "real time" was being used as "a term-of-art for a different kind of computing". In Thompson's reading, the user experience is a time-sharing operating system that is "a variation of iOS" running on the M2, while "a subsystem that primarily operates the R1 chip" is real-time, so that "even if visionOS hangs or crashes" the outside world is still rendered within 12 milliseconds. This is Thompson's interpretation, not a technical description published by Apple.[18]
Smart glasses
The firmware of the Halo glasses, which Brilliant Labs publishes on GitHub, is described as "a Zephyr RTOS application for the Alif Balletto B1", a chip with an Arm Cortex-M55 core, Bluetooth LE 5.3 and an Arm Ethos-U55 NPU. The firmware adds a Lua runtime for on-device apps and supports wireless firmware updates over Bluetooth, with the MCUboot bootloader providing test-boot and automatic revert.[5]
As archived in October 2025, the developer documentation of MentraOS, which supports several types of smart glasses, distinguished "Android-based glasses" such as Mentra Live, TCL RayNeo and INMO Air, which run Android directly, from "RTOS/Firmware-based glasses" such as the Even Realities G1 and Vuzix Z100, which run custom firmware. For the second group, the documentation tells developers to implement the Bluetooth LE services defined in a firmware specification and a matching client protocol in the phone app.[6]
See also
References
- ↑ 1.00 1.01 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 1.10 1.11 1.12 1.13 1.14 1.15 Javier D. Orozco, Rodrigo M. Santos (2012-03-02). "Real-Time Operating Systems and Programming Languages for Embedded Systems". Embedded Systems - Theory and Design Methodology (ed. Kiyofumi Tanaka), IntechOpen. doi:10.5772/38571. https://www.intechopen.com/chapters/29205. Retrieved 2026-10-15.
- ↑ 2.0 2.1 "FreeRTOS - Real-time operating system for microcontrollers and small microprocessors". FreeRTOS. Amazon Web Services. https://www.freertos.org/. Retrieved 2026-10-15.
- ↑ 3.0 3.1 "Introducing Apple Vision Pro: Apple's first spatial computer". Apple Newsroom. Apple. 2023-06-05. https://www.apple.com/newsroom/2023/06/introducing-apple-vision-pro/. Retrieved 2026-10-15.
- ↑ 4.0 4.1 Kyle Wiggers (2023-06-05). "What makes the Apple Vision Pro's visionOS such an ambitious leap". TechCrunch. https://techcrunch.com/2023/06/05/visionos-is-apples-latest-operating-system/. Retrieved 2026-10-15.
- ↑ 5.0 5.1 "halo-firmware: Firmware for Halo, Brilliant Labs' AI glasses". GitHub. Brilliant Labs. https://github.com/brilliantlabsAR/halo-firmware. Retrieved 2026-10-15.
- ↑ 6.0 6.1 "Add new glasses support - MentraOS". MentraOS documentation. Mentra. 2025-10-07. https://web.archive.org/web/20251007044423/https://docs.mentra.glass/contributing/add-new-glasses-support. Retrieved 2026-10-15.
- ↑ 7.0 7.1 J. A. Stankovic (1988-10). "Misconceptions about real-time computing: a serious problem for next-generation systems". Computer (IEEE), vol. 21, no. 10, pp. 10-19. https://doi.org/10.1109/2.7053. Retrieved 2026-10-15.
- ↑ C. L. Liu, James W. Layland (1973-01). "Scheduling Algorithms for Multiprogramming in a Hard-Real-Time Environment". Journal of the ACM, vol. 20, no. 1, pp. 46-61. https://doi.org/10.1145/321738.321743. Retrieved 2026-10-15.
- ↑ L. Sha, R. Rajkumar, J. P. Lehoczky (1990). "Priority inheritance protocols: an approach to real-time synchronization". IEEE Transactions on Computers, vol. 39, no. 9, pp. 1175-1185. https://doi.org/10.1109/12.57058. Retrieved 2026-10-15.
- ↑ 10.0 10.1 Mike Jones (1997-12-07). "What really happened on Mars Rover Pathfinder". Cornell University CS 614 course readings. https://www.cs.cornell.edu/courses/cs614/1999sp/papers/pathfinder.html. Retrieved 2026-10-15.
- ↑ 11.0 11.1 Deirdré Straughan (2017-11-29). "Announcing FreeRTOS Kernel Version 10". AWS Open Source Blog. Amazon Web Services. https://aws.amazon.com/blogs/opensource/announcing-freertos-kernel-v10/. Retrieved 2026-10-15.
- ↑ 12.0 12.1 "The Linux Foundation Announces Project to Build Real-Time Operating System for Internet of Things Devices". The Linux Foundation. 2016-02-17. https://www.linuxfoundation.org/press/press-release/the-linux-foundation-announces-project-to-build-real-time-operating-system-for-internet-of-things-devices. Retrieved 2026-10-15.
- ↑ Rich Pell (2020-10-01). "Google, Facebook select Zephyr RTOS for next-gen IoT products". eeNews Europe. https://www.eenewseurope.com/news/google-facebook-select-zephyr-rtos-next-gen-iot-products. Retrieved 2026-10-15.
- ↑ "Project Members". Zephyr Project. https://www.zephyrproject.org/project-members/. Retrieved 2026-10-15.
- ↑ 15.0 15.1 "LynxOS-178: DO-178C and DO-356 Certified POSIX RTOS for Avionics and Safety-Critical Systems". Lynx Software Technologies. https://www.lynx.com/products/lynxos-178-do-178c-certified-posix-rtos. Retrieved 2026-10-15.
- ↑ 16.0 16.1 16.2 Muhammad Huzaifa, Rishi Desai, Samuel Grayson, Xutao Jiang, Ying Jing, Jae Lee, Fang Lu, Yihan Pang, Joseph Ravichandran, Finn Sinclair, Boyuan Tian, Hengzhi Yuan, Jeffrey Zhang, Sarita V. Adve (2021-03-03). "Exploring Extended Reality with ILLIXR: A New Playground for Architecture Research". arXiv:2004.04643 (v2). https://arxiv.org/abs/2004.04643. Retrieved 2026-10-15.
- ↑ "Apple Vision Pro - Technical Specifications". Apple. https://www.apple.com/apple-vision-pro/specs/. Retrieved 2026-10-15.
- ↑ Ben Thompson (2023-06-06). "Apple Vision". Stratechery. https://stratechery.com/2023/apple-vision/. Retrieved 2026-10-15.