Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RT preempt vs RTAI vs Xenomai for real-time linux

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?

like image 519
Jeon Avatar asked Jun 29 '15 06:06

Jeon


People also ask

What does preempt RT do?

PREEMPT_RT makes interrupts run as threads, so you have the ability to modify the priorities of interrupts as well, and have user space tasks run at even a higher priority than interrupts. Having interrupts run as threads lets you prioritize the interrupt handlers even when the hardware does not support it.

What is real-time in Linux?

RTLinux is a hard realtime real-time operating system (RTOS) microkernel that runs the entire Linux operating system as a fully preemptive process.


1 Answers

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.

like image 171
Xavier T. Avatar answered Oct 07 '22 10:10

Xavier T.