Tech, ExplainedCloud platforms and developer tools
Product

Real-time operating system (RTOS)

Answers on time, every time, inside aircraft.

BEFORE ITAFTER ITReal-time operatingsystem (RTOS)Wind RiverAptivPARTEmbedded system simulation+COVERSFixed timingTask prioritiesEmbedded LinuxCertified versionsModel-based designprovidesgeneratedcodeAI for embedded softwaresupplieschip coderuns onMicrocontroller (MCU)↗ ANALOG AND EMBEDDED CHIPSruns flightsoftware inAvionics↗ AEROSPACErunscontrollertasks inProgrammable logiccontroller (PLC)↗ INDUSTRIAL AUTOMATIONCONCEPTS IT USESFirmwareBEFORE ITAFTER ITReal-time operatingsystem (RTOS)Wind RiverAptivPARTEmbeddedsystem simulation+COVERSFixed timingTaskprioritiesEmbedded LinuxCertifiedversionsModel-baseddesignprovidesgeneratedcodeAI forembedded softwaresupplieschip coderuns onMicrocontroller(MCU)↗ ANALOG ANDEMBEDDED CHIPSruns flightsoftware inAvionics↗ AEROSPACErunscontrollertasks inProgrammablelogiccontroller (PLC)↗ INDUSTRIALAUTOMATIONCONCEPTS IT USESFirmwareBEFORE ITModel-based design↓ provides generated codeAI for embedded software↓ supplies chip codeReal-time operating system (RTOS)Wind RiverAptivEmbedded system simulation+Fixed timingTask prioritiesEmbedded LinuxCertified versionsAFTER IT↓ runs onMicrocontroller (MCU)↗ ANALOG AND EMBEDDED CHIPS↓ runs flight software inAvionics↗ AEROSPACE↓ runs controller tasks inProgrammable logic controller (PLC)↗ INDUSTRIAL AUTOMATIONCONCEPTS IT USESFirmware
In a Hyderabad ventilator, the RTOS pauses the display task within microseconds so that the pressure-control task runs every 2 milliseconds, with its code coming from model-based design and running on a microcontroller.
opens a page inside this one a page in the same scene a page in another scene a concept page a label only, with no page

A real-time operating system (RTOS) is an operating system that responds within a fixed time, every time. For an RTOS, a late answer counts as a failure, even if the answer is correct. RTOSes run inside aircraft, industrial controllers, medical devices, cars and telecom equipment. An operating system is the base software that shares a computer's processor, memory and connections among the programs that run on it.

How is this different from Windows on a laptop or Linux on a server? Those systems are built to get the most work done on average. If a laptop pauses for half a second, nobody is harmed. An RTOS is built to be predictable. It guarantees that the most urgent task starts within a known time, often a few millionths of a second, every time. This guarantee is called determinism.

An RTOS divides the device's software into tasks, and gives each task a priority. When an urgent task becomes ready to run, the RTOS stops a less urgent task immediately and runs the urgent one first. This is called pre-emption.

Consider a medical device company in Hyderabad that builds ventilators for intensive care units. A ventilator pushes air into a patient's lungs and lets it out again, breath by breath. Its software has three main tasks. The control task reads the pressure sensor every 2 milliseconds and adjusts the air valve. The alarm task sounds an alarm if the pressure goes outside safe limits. The display task updates the touch screen. The RTOS gives the control task the highest priority. Say a nurse is changing a setting on the screen at the moment a pressure reading arrives. The RTOS pauses the display task within microseconds and runs the control task. The screen updates a few milliseconds later, which nobody notices. The patient's breath is never late.

RTOSes are small. Many run on a microcontroller with less than 1 MB of memory, as part of the device's firmware. Larger devices need networking, screens and many programs. For these, makers use embedded Linux, a version of Linux built to run inside a device rather than on a server. Some devices run both: an RTOS for the urgent control, and embedded Linux for the screen and the network.

In aircraft and medical devices, the operating system itself must be approved along with the device, as the page on safety certification explains. So RTOS makers sell versions that come with the test records a regulator asks for. This saves each device maker years of work.

The code that runs on an RTOS often comes from a model-based design tool. It is tested before the hardware exists through embedded system simulation. RTOSes also run much of the avionics, the electronic systems of an aircraft, and some programmable logic controllers (PLCs) in factories.

Tech, Explained is a part of ingrid.fyi. Every page explains one piece of technology in plain words.