Linux Can Now Power Real-Time Operating Systems, as the PREEMPT_RT Patch Set Is Merged Into Mainline

After nearly 20 years in development, PREEMTP_RT is now in mainline Linux — for x86, 64-bit Arm, and RISC-V platforms, at least.

Gareth Halfacree
3 days agoProductivity

Linux creator and maintainer Linus Torvalds has accepted a submission that makes a major change to the kernel — allowing users on 32-bit and 64-bit x86, 64-bit Arm, and RISC-V systems to enable a real-time scheduler, giving Linux-based operating systems to ability to become hard real-time operating systems (RTOSes).

"After twenty years of development we finally reached the point to enable PREEMPT_RT support in the mainline kernel," Linux developer Thomas Gleixner explains of the patches. "All prerequisites are merged, so [we will] enable it on the supported architectures ARM64, RISCV and x86 (32/64-bit)."

Traditionally, operating systems built around the Linux kernel have been non-real-time — meaning that things happen when they happen, and just because a particular task took a particular time the last time it ran doesn't mean it'll take the same time the next time it runs. This stands in contrast to a hard real-time operating system (RTOS), in which a given task is guaranteed to complete within a set timescale — a must for safety-critical work in automotive, industrial automation, and beyond.

The PREEMPT_RT patch set enables both hard and soft real-time capabilities, in which either all tasks complete before their deadlines or specific tasks can be guaranteed to complete before their deadlines, and has been in development since 2005. While the patches are already used by organizations including Canonical to release modified real-time Linux kernels for embedded operating systems, it's never been formally accepted into the Linux kernel itself — known as the "mainline" kernel — until now.

The merging of the patches means that those wanting a real-time operating system will no longer need a modified version of the Linux kernel, but will be able to use the mainline kernel — and that any Linux system running on a compatible architecture can be switched between hard, soft, and non-real-time operation at its users desire.

The merge is documented in this Git commit from Torvalds.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles