Chapter 14. The RT Patch

Steven Rostedt

Over the past few years, there has been a large effort in the Linux community to convert the Linux kernel into a true real-time operating system (RTOS), without the help of a microkernel. In order to achieve this, several changes to the kernel were necessary. For Linux to behave properly in a real-time environment, interrupt service routines must not be able to unconditionally preempt any process running on the CPU, protection for critical sections needs to be narrowed to block only those processes that might access them, and unbounded priority inversion must not be allowed. The pros and cons of native Linux real-time versus an accompanying microkernel were covered in Chapter 12.

In the past, several people have tried to implement a full real-time Linux kernel. Some have even built their businesses around it. In the 2.2 and 2.4 Linux time frame, TimeSys, a small real-time Linux company, branched off from the mainline kernel (the kernel provided by, to create and support its own kernel that implemented the changes just mentioned. But maintaining a kernel outside the mainline Linux tree has proven to be very difficult.

Ingo Molnar, a major contributor to the Linux kernel, showed up on the real-time scene after watching others work on their efforts to turn the Linux kernel into an RTOS. Seeing some of the benefits of having real-time capabilities in Linux, Molnar started his own patch against the mainline kernel to add real-time features. ...

Get Building Embedded Linux Systems, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.