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.