
PREEMPT_RT (also known as RT-Preempt or Linux-RT) is a set of Linux kernel patches that transform a general-purpose kernel into a hard real-time operating system (hard-RTOS). The project is sponsored by the Linux Foundation and has been developed since 2004, initially by Ingo Molnár and Thomas Gleixner.
Key mechanisms introduced by the patch: conversion of spinlock hotpaths to preemptable mutexes (RT-mutex), full kernel preemption (PREEMPT_RT_FULL), high-resolution timers (hrtimers) as the real-time cycle clock source, priority inheritance to prevent priority inversion, and interrupt handling in thread context (threaded IRQs).
In robotics, the patch is required or strongly recommended for motion control applications with cycle times below 1 ms. It is used by ros2_control, IgH EtherCAT Master, various MoveIt stacks, and directly in humanoid robot control systems.
Starting from kernel 6.12 LTS (SLTS), much of the PREEMPT_RT functionality has been merged into mainline Linux as the `CONFIG_PREEMPT_RT` Kconfig option, eliminating the need for external patches on modern distributions.
General-purpose or robotics-specialized operating system — Ubuntu, Ubuntu Core, ROS-aware distributions. Provides the platform for middleware, runtime, and robotic applications.
A Runtime is the environment or execution layer used to run code, load libraries, manage dependencies, and operate applications or services — either in real time or during normal system operation. In robotics this includes real-time operating system (RTOS) runtimes, ROS 2 executor runtimes, containerised execution environments (Docker, podman), and embedded C++ runtimes on microcontrollers.
Family of tools providing hard real-time capabilities in Linux and EtherCAT fieldbus communication – the foundation of industrial and robotic low-level control.
Used in ros2_control, IgH EtherCAT, humanoid environments (Atlas, KUKA LBR, Franka), CNC systems, autonomous vehicles.
Hundreds of regular contributors, thousands of industrial and research deployments; officially supported by the Linux Foundation.
Ubuntu 24.04 LTS 'Noble Numbat' — supported until April 2029. The host for ROS 2 Jazzy.
License family: Strong Copyleft
Most patches merged into mainline as CONFIG_PREEMPT_RT in kernel 6.12 LTS.
Continued LTS branch maintenance with latency fixes.
Popular LTS version used by Ubuntu 22.04 Realtime.