Dates and Events: |
OSADL Articles:
2021-02-09 12:00
Open Source OPC UA PubSub over TSN project phase #3 launched![]() Letter of Intent with call for participation is now available
2017-09-12 12:00
OSADL project to create Open Source license checklists![]() Facilitate Open Source software delivery
2016-09-17 12:00
Preemption latency of real-time Linux systems![]() How to measure it – and how to fix it, if it's too high? |

Rationale
Is realtime possible with Linux? Yes, it is. But which Linux derivate should I use? This is the key question to be answered when Linux is going to be used in the automation industry.
The OSADL criteria for realtime Linux are:
- Long-term availability
- Ease of use (user space realtime)
- POSIX API for real time (standard API)
- Wide architecture support
- Mainstream support by the Vanilla Kernel
This project supports the real-time PREEMPT_RT patches for mainline Linux developed among others by Ingo Molnár and Thomas Gleixner and now maintained by Thomas Gleixner and coworkers. We believe that long-term stability can only be achieved when the real-time aspects are as close to the vanilla kernel as possible.
Some more information on the PREEMPT_RT patches
General road map of the main patch components
Architecture | x86 | x86/64 | powerpc | arm | mips | 68knommu |
Feature | ||||||
Deterministic Scheduler | ||||||
Preemption Support | ||||||
PI Mutexes | |
| ||||
High-Resolution Timer |
|
|
|
| ||
Preemptive Read-Copy Update |
|
|
|
|
|
|
IRQ Threads |
|
|
|
|
|
|
Raw Spinlock Annotation |
|
|
|
|
|
|
Forced IRQ Threads |
|
|
|
|
|
|
R/W Semaphore Cleanup |
|
|
|
|
|
|
Full Realtime Preemption Support |
|
Available in mainline Linux
Available when Realtime Preempt patches applied
1) Since kernel 2.6.24 in mainline Linux
2) Since kernel 2.6.25 in mainline Linux
3) Realtime-Preempt patches 2.6.24.7-rt15 or higher required
4) Since kernel 2.6.30 in mainline Linux
5) Not yet adapted to generic interrupt code
6) Since kernel 2.6.33 in mainline Linux
7) Since kernel 2.6.39 in mainline Linux
Download locations
- The Linux Kernel: Linux Vanilla Kernel
- The Real Time Preempt Patch: RT Preempt Download Page at kernel.org
Mailing list where releases are announced
Installation hints
Let a script do the job for you
All profiles of the OSADL QA Farm Realtime systems contain a button to trigger an on-line script generator. The resulting script can be saved in a local computer and used to download, patch and configure a Linux kernel source tree that corresponds 1:1 to the kernel in use at the particular QA Farm system. The script generation button is located at the bottom of the profile page, e.g. here for the system in rack #0, slot #0.
Quick overview
A quick list of the commands needed to download, patch and build an RT-Preempt realtime Linux kernel is given here.
HOWTO
A more detailed description how to equip the Linux kernel with realtime capabilities is given here.
Precompiled Debian kernels
The Debian project offers precompiled realtime versions of the Linux kernels they support as packages for their distribution. Currently, the supported architectures are
- 686
- amd64
- arm64
- armmp
Quality assurance
Stability and capabilities of Realtime Linux are continuously monitored on a number of different computer boards and processor families in the OSADL testing labs also known as the "OSADL QA Farm". One of the labs has a direct link to the OSADL Web server; this makes it possible to display the quality assurance data on realtime in real time here!
Recommended reading
These two articles by Paul E. McKenney are somewhat outdated (2005 and 2007); in consequence, some details are no longer reflecting the current situation of the PREEMPT_RT patches, but the principle is still the same.