← Back to Digest
Systems & ControlApr 21, 2026

Scheduling Analysis of UAV Flight Control Workloads using Raspberry Pi 5 Using PREEMPT_RT Linux

A Raspberry Pi 5 running a real-time Linux patch cuts worst-case flight-control latency by 88%, but residual hardware memory contention remains the next bottleneck.

2.5
Hunch Score
2.8
Academic
2.0
Commercial
4.5
Cultural
HorizonNear (0-2y)
Evidencemedium
Was this useful?

The Thesis

Modern drones increasingly try to run both high-level autonomy software and low-level flight control on one general-purpose chip — a cost-saving design that only works if the operating system can meet strict timing deadlines. This paper measures, on a Raspberry Pi 5, how much a real-time Linux patch called PREEMPT_RT (which forces the OS to respond to urgent tasks immediately rather than batching them) improves the worst-case response time for a 250 Hz control loop — the kind of fast, repetitive calculation that keeps a drone stable in flight. The results are striking: worst-case latency drops from over 9 milliseconds with the standard Linux kernel to under 225 microseconds with PREEMPT_RT. The catch is that even with the OS fixed, timing jitter — small, unpredictable variations in when tasks run — persists because multiple CPU cores share memory hardware, creating contention that software alone cannot eliminate.

Catalyst

The Raspberry Pi 5 introduced a new system-on-chip (the BCM2712) with multiple high-performance cores and a more complex memory subsystem than its predecessors, making the timing behavior of real-time software on this hardware an open and practically important question. Simultaneously, the drone industry is actively consolidating flight stacks onto single-board computers running Linux, making latency characterization on affordable, widely available hardware directly relevant to commercial product decisions. PREEMPT_RT's recent integration path toward the Linux mainline kernel has also renewed practitioner interest in its real deployment limits.

What's New

Earlier timing studies of PREEMPT_RT on drones typically used older single-core or simpler multi-core boards — or characterized latency under light load without isolating which specific kernel code path (deferred SoftIRQ execution versus direct real-time wake-up) was responsible for the variance. This paper isolates the kernel activation path as the primary OS-level variable and deliberately applies heavy system stress to surface worst-case rather than typical behavior. The authors' key contribution is pinning residual jitter, after the OS fix is applied, specifically on hardware memory bus contention among cores — a finding that shifts the engineering problem from software configuration to chip architecture.

The Counter

This paper essentially confirms what the embedded Linux community has known for over a decade: PREEMPT_RT dramatically improves worst-case latency, and shared-memory multi-core hardware is the next problem. Neither finding is new. The drone industry's serious players — those building certified or high-reliability platforms — have long used dedicated real-time microcontrollers (running NuttX or ChibiOS) alongside a companion computer for autonomy, precisely because no Linux configuration can yet offer the hard real-time guarantees that safety-critical flight demands. A Raspberry Pi 5 in a lab, stressed with synthetic loads and measured with cyclictest, is very far from FAA or EASA certification evidence. The residual jitter from memory contention the authors identify is not a solvable software problem — it requires cache partitioning, memory bandwidth reservation, or hardware redesign, none of which are addressed here. Practitioners evaluating this for real deployments will still need dedicated flight-control silicon, making this a useful academic datapoint rather than a design recommendation.

Longs

None listed.

Shorts

  • Vendors of dedicated microcontroller-based flight controllers (e.g., boards running NuttX/ChibiOS) whose selling point is deterministic timing — if general-purpose Linux on cheap SBCs is shown to meet the same deadline requirements, the dedicated MCU market for basic flight control narrows.

Enablers (Picks & Shovels)

  • PREEMPT_RT Linux patch set (open-source real-time kernel extension, now partially mainlined)
  • Raspberry Pi Ltd (hardware platform studied; broad availability accelerates reproducibility)
  • cyclictest (open-source latency measurement tool used in the study)

Private Watchlist

  • Auterion (commercial PX4/Linux flight stack for enterprise drones)
  • Dronecode Foundation / PX4 ecosystem (open-source Linux-based autopilot)

The Paper

Modern UAV architectures increasingly aim to unify high-level autonomy and low-level flight control on a single General-Purpose Operating System (GPOS). However, complex multi-core System-on-Chips (SoCs) introduce significant timing indeterminism due to shared resource contention. This paper performs an architectural analysis of the PREEMPT RT Linux kernel on a Raspberry Pi 5, specifically isolating the impact of kernel activation paths (deferred execution SoftIRQs versus real-time direct activation) on a 250 Hz control loop. Results show that under heavy stress, the standard kernel is unsuitable, exhibiting worst-case latencies exceeding 9 ms. In contrast, PREEMPT RT reduced the worst-case latency by nearly 88 percent to under 225 microseconds, enforcing a direct wake-up path that mitigates OS noise. These findings demonstrate that while PREEMPT RT resolves scheduling variance, the residual jitter on modern SoCs is primarily driven by hardware memory contention.

Synthesized 4/23/2026, 8:09:38 AM · claude-sonnet-4-6