What Is a Real-Time Operating System (RTOS)?
A real-time operating system responds within a known time, every time. How an RTOS schedules work, hard vs soft real time, common options, when Linux with real-time patches is enough and what the hardware has to do.
A real-time operating system (RTOS) is an operating system designed so that important tasks finish within a known, guaranteed time. “Real time” does not mean fast. It means predictable: a system that always answers in 10 ms can be real time, while one that usually answers in 1 ms but sometimes takes 200 ms is not.
That predictability matters wherever a late result is a wrong result, such as firing a fuel injector, closing a servo loop or stopping a robot arm. General-purpose systems like desktop Windows and standard Linux aim for good average performance across many jobs. An RTOS aims for a good worst case on the jobs that matter most. It is one type of embedded operating system, and many run on small microcontrollers, although larger ones run on multi-core industrial computers.
Key takeaways
- 01Real time means predictable, not fast
- The test is whether the worst-case response always meets the deadline, not how quick the average response is.
- 02Priority drives the scheduler
- An RTOS interrupts lower-priority work immediately when a higher-priority task becomes ready to run.
- 03Hard and soft deadlines differ
- In a hard real-time system a missed deadline is a failure. In a soft one it just reduces quality for a moment.
- 04Linux can often be enough
- PREEMPT_RT is now in the mainline Linux kernel and suits many jobs with deadlines of tens of microseconds or more, after testing on the target hardware.
- 05Hardware affects timing too
- Firmware settings, power-saving states and shared caches can all add delay, so measure on the actual system.
RTOS vs a general-purpose operating system
The table is the quick reference. The two types share many concepts, including tasks, memory and drivers, but they make opposite trade-offs.
| Feature | RTOS | General-purpose OS |
|---|---|---|
| Main goal | Meet deadlines every time | Good average performance and fairness |
| Scheduling | Strict priority, immediate pre-emption | Shares time fairly across tasks |
| Latency | Bounded and documented where possible | Usually low, with no guarantee |
| Size | From a few kilobytes up | Hundreds of megabytes to gigabytes |
| Memory use | Often static and carefully controlled | Virtual memory with paging |
| Application range | Fixed, known tasks | Anything a user installs |
| User interface | Often none | Rich graphics and desktop |
| Typical hardware | Microcontrollers to multi-core CPUs | PCs, servers, phones |
How a real-time operating system works
Software on an RTOS is divided into tasks, also called threads, and each has a priority set by the designer. The scheduler is the heart of the system. Whenever a higher-priority task becomes ready, usually because of an interrupt from a sensor or timer, the scheduler stops the running task and switches to it straight away.
- Tasks and priorities. Designers give the most time-critical work the highest priority. A common method, rate-monotonic scheduling, gives higher priority to tasks that run more often.
- Pre-emption. A running task can be stopped at almost any point so that a more urgent one can run. The time spent switching is short and designed to be consistent.
- Interrupts. Hardware signals alert the processor to events. Interrupt handlers are kept short, and they usually hand longer work to a task.
- Synchronisation. Semaphores, mutexes and message queues let tasks share data safely without corrupting it.
- Timers and ticks. A hardware timer drives periodic work, such as running a control loop every millisecond.
Latency, jitter and determinism
Three terms come up in every real-time discussion, and they are often confused.
- Latency is the time between an event and the system’s response to it.
- Jitter is how much that time varies from one event to the next. A control loop often copes better with a slightly longer delay that stays steady than with a short one that varies.
- Determinism means behaviour can be predicted in advance, including its worst case.
Average figures mean very little here. For a real-time design the number that matters is the longest delay under the heaviest realistic load, measured over a long run.

Priority inversion: the classic real-time bug
Priority inversion happens when a high-priority task waits for a resource held by a low-priority task, and a medium-priority task keeps the low-priority one from finishing. The most famous case is NASA’s Mars Pathfinder lander in 1997, which suffered repeated resets until engineers enabled priority inheritance from Earth. With priority inheritance, the low-priority task temporarily takes on the higher priority so that it can finish and release the resource. Most RTOSes offer it, but it still has to be switched on and used correctly.

Hard, firm and soft real time
Not every system needs the same guarantee. The question to ask is what happens if a deadline is missed once.
| Type | If a deadline is missed | Examples | Typical deadlines |
|---|---|---|---|
| Hard | The system has failed, and harm or damage may follow | Airbag control, flight control, motor drives | Microseconds to milliseconds |
| Firm | The late result is useless, but occasional misses can be tolerated | Vision reject on a fast line, industrial communications | Milliseconds |
| Soft | Quality falls but the system continues | Video playback, operator displays | Tens of milliseconds or more |
The timings are illustrative, because the type depends on the consequence of a miss, not on the size of the number. A deadline of one second can still be hard if missing it causes damage.
Common real-time operating systems
RTOS options range from small open-source kernels to commercial products supplied with certification evidence. Licensing and certification terms change, so check them with the supplier.
| RTOS | Licence type | Typical hardware | Often used in |
|---|---|---|---|
| FreeRTOS | Open source (MIT) | Microcontrollers | IoT devices, sensors, small controllers |
| Zephyr | Open source (Apache 2.0) | Microcontrollers and small processors | Connected devices, wearables, industrial nodes |
| Eclipse ThreadX | Open source (MIT) | Microcontrollers | Consumer and industrial devices |
| QNX | Commercial | Arm and x86 computers | Vehicles, medical, rail, industrial control |
| VxWorks | Commercial | Arm, x86 and others | Aerospace, defence, industrial |
| INTEGRITY | Commercial | Arm, x86 and others | Avionics, defence, security-critical systems |
| RTEMS | Open source | Various embedded processors | Space and scientific instruments |
| Linux with PREEMPT_RT | Open source (GPL) | x86 and Arm computers | Robotics, automation, test systems |
RTOS vs Linux and PREEMPT_RT
Standard Linux is not a real-time system, but it can get close. The PREEMPT_RT work makes almost all of the kernel pre-emptible and moves most interrupt handling into schedulable threads. After years as a separate patch set, it was merged into the mainline kernel in version 6.12, released in late 2024, which makes it easier to adopt. On tuned hardware, worst-case latency can often reach the range of tens of microseconds, although results vary widely by system.
Linux with PREEMPT_RT brings the full embedded Linux world of drivers, networking and AI libraries with it. That makes it a practical fit for many robotics and machine-control systems. It is much harder to prove its worst-case behaviour formally, though, because the kernel is so large. Systems with safety-critical deadlines more often use a dedicated RTOS.
| Consideration | Dedicated RTOS | Linux with PREEMPT_RT |
|---|---|---|
| Worst-case timing | Tightest, and easier to analyse | Good when tuned, proved by measurement |
| Software available | Smaller range of libraries | Very large range |
| AI and vision | Limited on small systems | Strong framework and GPU support |
| Size | Kilobytes to megabytes | Tens of megabytes or more |
| Safety certification | Certified options available | More difficult, with limited options |
| Skills | Specialist | Widely available |
Is Windows a real-time operating system?
No. Windows schedules by priority, but it does not guarantee a maximum response time. Windows IoT Enterprise can be tuned for soft real-time work, and third-party extensions such as RTX64 can add a real-time layer alongside it, as can the real-time kernels in some industrial automation software. A common approach for a Windows HMI with tight control needs is to let a PLC or a separate real-time controller run the deadline-critical part. See our guide to Windows IoT Enterprise for its broader capabilities.
Running both on one system
Many current designs do not have to choose. A few common patterns let a real-time part and a general-purpose part share the same hardware.
- Asymmetric processing. Some SoCs pair application cores running Linux with small real-time cores, such as Arm Cortex-R or Cortex-M, running an RTOS. NVIDIA Jetson modules, for example, include a Cortex-R5 sensor processing engine.
- Hypervisors. A real-time hypervisor can run an RTOS and Linux or Windows in separate partitions on the same multi-core processor.
- Core isolation. On Linux, real-time tasks can be pinned to CPU cores kept free of other work, which reduces jitter.
- A separate controller. A PLC or microcontroller handles the hard deadlines, and an industrial PC handles data, vision and the interface over a fieldbus or Ethernet link.
What the hardware does to real-time performance
Software alone cannot guarantee timing, because the hardware can introduce delays the operating system never sees. This matters most on x86 computers, which are built to balance performance and power.
- Power-saving states. Deep CPU sleep states take time to wake from. Real-time systems often limit them in firmware.
- Frequency changes. Turbo and speed-stepping can make execution time vary, so they are often fixed for the most consistent results.
- System management interrupts. Firmware on x86 can pause the operating system without warning. Some boards offer firmware settings or tuning to reduce this.
- Shared caches and memory. One core’s heavy work can slow another’s. Intel’s Time Coordinated Computing, on selected processors, includes features to help reduce this effect, so check current support for your processor.
- Network timing. A real-time controller still has to communicate on time. Time-sensitive networking and fieldbuses such as EtherCAT address that part of the path.
Our embedded PCs and fanless industrial computers use standard operating systems, and real-time behaviour depends on the processor, firmware and software image. Measure before you commit. The open-source cyclictest tool is a common way to record worst-case scheduling latency on Linux under load.
Where real-time operating systems are used
| Industry | Typical job | Why timing matters |
|---|---|---|
| Automotive | Engine, braking and driver assistance control | A late command affects safety |
| Industrial automation | Motion control and drive systems | Timing variation reduces accuracy and quality |
| Robotics | Joint control and safety stops | Control loops need steady timing |
| Aerospace and defence | Flight control and mission systems | Failure can be catastrophic, so certification is common |
| Medical | Infusion pumps and imaging | Doses and images depend on precise timing |
| Energy | Grid protection relays | Faults have to be cleared within strict limits |
Certification can be part of the decision. Standards such as IEC 61508 for functional safety, ISO 26262 for vehicles and DO-178C for avionics apply to the whole system and how it was developed, so a certified RTOS helps but does not make a product compliant by itself.
How to choose a real-time operating system
Seven questions that usually settle the choice before any hardware is bought.
-
01
The deadline
Write down the actual deadline and what happens if it is missed. This decides whether you need hard real time at all.
-
02
The worst case
Set a maximum acceptable latency and jitter, and test it under the heaviest realistic load.
-
03
The hardware
Small microcontrollers point to FreeRTOS or Zephyr, while multi-core computers open up QNX, VxWorks or Linux.
-
04
Software needs
AI, vision and rich networking favour Linux. Check that the libraries you depend on support your choice.
-
05
Certification
If the product needs safety certification, ask suppliers what evidence exists for your standard and safety level.
-
06
Licensing and support
Compare per-device fees, source access and how long the supplier will provide patches.
-
07
Skills
A familiar system that meets the deadline often beats a stronger one your team has never used.
Real-time operating systems: common questions
Quick answers
What is an example of a real-time operating system?
FreeRTOS is one of the most widely used. Others include Zephyr, QNX, VxWorks and INTEGRITY. Linux with PREEMPT_RT is used for many real-time jobs too.
What is the main difference between an RTOS and a normal OS?
Predictability. An RTOS is designed so that high-priority work meets its deadline, while a normal operating system aims for good average performance and fairness.
Is Linux a real-time operating system?
Not by default. With PREEMPT_RT, now in the mainline kernel, it can meet many real-time requirements, but tests on the target hardware are essential.
Does a real-time system have to be fast?
No. Real time is about meeting deadlines. A slow control loop with a steady, guaranteed period is still real time.
Do I need an RTOS for my project?
Only if timing failures have real consequences. If occasional delays of a few milliseconds cause no harm, a general-purpose system is usually simpler and cheaper to support.
What is a real-time system in simple words?
One that always responds on time. Think of a car’s airbag controller: the right answer has no value if it arrives too late.
Real-time and embedded FAQs
-
What Is an Embedded Operating System?
An embedded operating system is an operating system designed to run inside a dedicated device instead of a general-purpose computer. It is cut down to what the product needs and tuned for reliability, long life and sometimes strict timing. Common examples are embedded Linux, Windows IoT Enterprise, FreeRTOS, QNX and VxWorks.
-
What Is Embedded Linux?
Embedded Linux is the Linux kernel and a trimmed set of software built to run one dedicated device, such as an industrial controller, gateway, camera or edge AI computer, rather than a general-purpose PC. It is assembled for specific hardware, often an Arm processor, and usually boots straight into the device’s application.
-
What Is a Watchdog Timer?
A watchdog timer (WDT) is a hardware countdown that resets a computer or microcontroller if its software stops responding. Healthy software restarts the countdown at regular intervals. If the software hangs and the timer reaches zero, the watchdog triggers a reset, so an unattended system recovers by itself instead of waiting for someone to restart it.
-
What Is a Board Support Package (BSP)?
A board support package (BSP) is the low-level software that lets an operating system run on a particular board: the bootloader, kernel, device drivers and hardware description such as the device tree. For NVIDIA Jetson, the BSP is Jetson Linux, delivered as part of JetPack, and custom carrier boards need it adapted to their hardware.
-
What Is a PLC?
A PLC (programmable logic controller) is a rugged industrial computer that controls machines and processes. It reads inputs from sensors and switches, runs a control program in a fast repeating cycle and switches outputs such as motors, valves and lamps. PLCs replaced hard-wired relay panels and now run most factory, utility and building automation.
-
What Is an Embedded System?
An embedded system is a combination of a processor, memory, input/output and software built into a larger device to do one dedicated job, such as controlling a washing machine, a car’s brakes or a factory machine. Unlike a general-purpose PC, it runs fixed software, often in real time, and is designed around the device it serves.
-
What Is a Robot Controller?
A robot controller is the computer that runs a robot: it reads sensors, makes decisions and commands the motors. Industrial arms use the manufacturer’s motion controller, while mobile robots and vision-guided systems increasingly use an edge AI computer as the robotics controller, running camera perception, planning and communication with drives over CAN or Ethernet.
Planning a real-time system?
Tell us what the system has to control, how quickly it must respond and which operating system you plan to use. We will shortlist suitable hardware, then configure, image and test the computer before it ships.