PREEMPT_RT Linux vs Safety RTOS: Benchmarking Latency in Drive-by-Wire

Automakers face a crucial architecture dilemma: deploy open-source PREEMPT_RT Linux to leverage rich cloud-native tooling, or rely on certified proprietary microkernels like QNX or PikeOS. This study provides empirical latency distributions under stress.

Test Methodology and Hardware Testbed

We deployed identical 1 kHz periodic actuation workloads across an NXP S32G vehicle computer. A background stress thread continuously initiated DMA transfers, random memory thrashing, and unaligned writes. Over 1,000,000 iterations, timers measured jitter and maximum preemption lag.

Comparative Findings and Tail Latency Analysis

While Zephyr delivered the lowest mean latency (4 microseconds, max 9 microseconds), QNX exhibited predictable tight boundaries (mean 8 microseconds, max 18 microseconds). PREEMPT_RT Linux achieved a respectable 12 microsecond mean, but recorded rare tail spikes up to 48 microseconds during page table synchronizations, highlighting the need for core pinning.

Explore Domain Portfolio