A realtime operating system is a special type of operating system used for what are called embedded systems. These are computers that often don't have a screen or keyboard and have limited resources such as memory or processor speed. An operating system (OS) such as Windows or MacOSX are not realtime OSs.
A realtime OS has the special requirement (in addition to being on an embedded system) that some operations need to be done within a specific timeframe or the operation is invalid. For example, sitting at your computer, if you don't touch a key for a few minutes, the computer isn't going to have a problem with that. However, in all realtime OSs, delays in the processing will cause errors.
Here are two examples of realtime OSs that are commonly used:
(1) A pacemaker. This is a device that is inserted in someone's chest to provide electrical impulses at regular intervals to help their heart beat. If the device missed a beat, it may be fatal.
(2) The Anti-lock Braking System (ABS) controller in a car. When the driver of the car presses on the brake, this device controls the signals to the actual brake pads with the wheels. If the device does not correctly manage the timing of the brake pads, the car will not stop correctly.
Realtime OSs involve special programming that takes additional training for software engineers and is considered more difficult to get correct for safe applications.
Real time operating systems are generally special-purpose ones designed to run embedded or specialized systems. These systems often operate in environments where there are significant constraints on hardware design and often narrow tasks that need to be done with great accuracy and speed. Real time systems are used in military, engineering, medical, and data communications systems (among others).
A traditional, general-purpose operating system such as Mac OS or Windows is designed for general consumers and imposes a massive overhead on the hardware, demanding significant amounts of storage for a wide variety of features ranging from playing and recording videos to editing photographs, playing music, monitoring internet security, downloading updates, and running business applications. This means that a significant amount of storage space and processing power end up devoted to things that simply aren't needed in a missile guidance system or an intelligent thermostat. Real time operating systems often consist of very small executive programs that simply monitor or control devices, have basic user interfaces, and are capable of running a very small number of applications, sometimes just one piece of software that accomplishes its main function and some sort of diagnostic software.
Typical examples of real time operating systems are those custom written for the Galileo and Voyager space probes. Because of extreme power and weight constraints, they needed to be coded extremely efficiently to use as little memory and to accomplish their tasks in as few operations as possible. The operating system needed to be able to interface with a limited group of devices in short windows, such as planet fly-bys or course changes, and then go into a dormant mode to conserve power.
Process control and embedded hardware and software are often paired with real time operating systems. The software embedded in intelligent missiles and military drones also needs to operate in real time. It needs to be able to quickly process and prioritize interrupts from software and hardware including commands from external sources and information from various sensors including navigational devices and internal monitoring devices that might give warnings of system malfunctions. The reason that a real time operating system is required for these is that off-the-shelf systems are often too inefficient and resource hungry for such applications.