RTOS
IoT & Roboticsconcept · 6 min · updated Jul 19, 2026

RTOS

By Rajendra Sharma, RN, CPC, CPBReviewed by Rajendra Sharma, RN, CPC, CPB · Jun 29, 2026

An operating system that promises *when*, not just *what* — the software heart of infusion pumps, monitors and ventilators.

IEC 62304

In one line

A real-time operating system schedules tasks with guaranteed timing: the alarm task runs within its deadline every time, no matter what else the device is doing — determinism over throughput.

schedulerpriority,preemptive task A (high) — sense task B (med) — log task C (low) — UI deadlines met,deterministically
A real-time OS schedules prioritised, preemptive tasks so a device meets hard deadlines — vital for pumps and monitors.

The problem it solves

A general-purpose OS (Linux, Windows) optimises for average throughput — it's fast overall but occasionally pauses for tens of milliseconds, and you can't predict when. For a ventilator closing a control loop or a pump metering a dose, an unpredictable pause is a safety failure. An RTOS trades raw throughput for determinism: it guarantees when a task runs, every time.

How it works

  • Priority-based pre-emptive scheduling — the highest-priority ready task runs now, pre-empting lower ones, within a bounded, measured latency.
  • Hard vs soft real-time — a hard real-time system (pacemaker, ventilator loop) treats a missed deadline as outright failure; a soft one (a display refresh) tolerates jitter.
  • Small and analysable — RTOSes are deliberately simple so timing can be reasoned about and certified. Common players: FreeRTOS, Zephyr, VxWorks, QNX.

The safety context

In medical devices the RTOS runs under software developed to the IEC 62304 lifecycle standard — the timing guarantee is part of the safety case, documented and verified, not just a performance nicety. This is the world of regulated, certified microcontroller firmware.

The boundary that matters for health IT

For the health-IT engineer (vs the device engineer), the key insight is where your world begins: the RTOS world ends at the device's communications port — where BLE, IEEE 11073 and MQTT take over and the integration story starts. You rarely write RTOS code, but knowing what's on the other side makes you far better at that boundary.

Where it shows up in digital health

Inside nearly every active medical device: infusion pumps metering doses, patient monitors sampling waveforms at fixed rates, ventilators closing control loops, dialysis machines, pacemakers.

Common pitfalls

  • Priority inversion — a low-priority task holding a resource blocks a high-priority one; RTOSes provide priority inheritance to prevent it.
  • Treating timing as "fast enough" — hard real-time needs bounded latency, not just low average latency.
  • Ignoring IEC 62304 — in a medical device, the process and documentation are part of the product.

Key takeaways

  • An RTOS guarantees when tasks run (determinism), not just throughput.
  • Priority-based pre-emptive scheduling; hard vs soft real-time deadlines.
  • In medical devices it underpins the IEC 62304 safety case.
  • It ends at the comms port — where BLE/11073/MQTT and the health-IT integration world begin.

Check your recall

0 of 2 recalled

Active recall beats re-reading — try to answer, then reveal.

  1. What does a real-time OS guarantee that a general-purpose OS doesn't?

  2. Hard vs soft real-time?

References

  1. FreeRTOS Documentation
  2. IEC 62304 — Medical device software lifecycle

Related entries