RT preempt vs RTAI vs Xenomai for real-time linux

Jeon picture Jeon · Jun 29, 2015 · Viewed 7.9k times · Source

What are differences, pros and cons of the three referred real time OS framework, extensions or patches?

I want to measure a CPU timestamp counter (TSC), time in nanosecond everytime when a data frame or an ack frame of Wifi is sent or received.

And I realized that one of three real time technique is required to increase precision and reduce jitter due to preempt, interrupt and context change.

Currently, I am applying RTAI to the kernel. As it takes a long time to compile, I'd like read something about those three.

Could you recommend some documents or explain about it?

Answer

Xavier T. picture Xavier T. · Mar 21, 2016

Found an interesting paper comparing Xenomai vs Preempt-RT with a basic GPIO test (vs stock kernel).

https://www.osadl.org/fileadmin/dam/rtlws/12/Brown.pdf

Xenomai has better performance overall (less jitter) but using it will force you to redevelop custom driver using the specific RTDM api. On the other hand, since Preempt RT is not in the mainline kernel, it is less tested and you can also have issues.

(Xenomai3 has actually two approaches : either using a real time micro kernel to manage real time threads and interrupts, or if you need less performance, using it with a single preempt-rt kernel)

Edit : I revisit that old answer from 2016 to add that in 2021, Prempt RT is about to be integrated in the mainline kernel and won't live as a "patch" anymore.