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.