Real-time Linux (PREEMPT_RT)
In short: A real-time kernel guarantees that tasks react within a fixed time. This matters for machines, audio and robots. Linux can become a real-time system with the PREEMPT_RT patch set.
In more detail: After years of work, real-time capability became part of the main branch (since version 6.12 it is in the official kernel).
In detail
- Hard and soft: hard: the deadline is always met. Soft: the deadline is usually met.
- How it works: the kernel can be interrupted almost anywhere, locks become sleeping, interrupts run as threads.
- Use: industrial controllers, audio production (JACK/PipeWire), robotics (ROS), telecommunications.
- Scheduling classes:
SCHED_FIFO,SCHED_RR,SCHED_DEADLINE. - Measuring:
cyclictestshows latencies. - Alternatives: Xenomai, special RTOS such as FreeRTOS, Zephyr.
See also: Alternative kernels: Zen, XanMod, Liquorix and hardened, The Linux kernel at a glance