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

This paper demonstrates that while the standard Linux kernel is unsuitable for high-frequency UAV flight control on a Raspberry Pi 5 due to excessive latency, the PREEMPT_RT kernel significantly reduces worst-case jitter by nearly 88%, though residual timing variance remains primarily driven by hardware memory contention.

Original authors: Luiz Giacomossi, Håkan Forsberg, Ivan Tomasic, Baran Çürüklü, Tommaso Cucinotta

Published 2026-04-22
📖 6 min read🧠 Deep dive

Original authors: Luiz Giacomossi, Håkan Forsberg, Ivan Tomasic, Baran Çürüklü, Tommaso Cucinotta

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

The Big Picture: Can a Smartphone Brain Fly a Drone?

Imagine you are building a drone. Traditionally, you needed two brains:

  1. The Pilot: A tiny, super-fast, simple computer (like a microcontroller) that does only one thing: keeps the drone from crashing. It reacts in microseconds.
  2. The Navigator: A powerful computer (like a Raspberry Pi or Jetson) that does the "cool stuff": recognizing faces, planning complex routes, and swarming with other drones.

The problem is that having two brains adds weight, wires, and complexity. The dream is to put both jobs on one powerful brain (a single System-on-Chip). But here's the catch: powerful brains usually run "General Purpose" operating systems (like standard Linux on your laptop). These systems are great at doing many things at once, but they are terrible at being precise. They are like a busy restaurant manager who is great at serving 50 tables but terrible at timing a soufflé that must come out of the oven at exactly 3:00 PM.

This paper asks: Can we make a powerful, single-board computer (the Raspberry Pi 5) fly a drone safely using a "Real-Time" version of Linux?


The Experiment: The "Stress Test"

The researchers set up a simulation where a drone needs to adjust its balance 250 times every second. That's a heartbeat of a control loop. If the computer takes even a tiny fraction of a second too long to say "tilt left," the drone could wobble or crash.

They tested two versions of the operating system on the Raspberry Pi 5:

  1. Standard Linux: The "Normal" version you'd find on a desktop.
  2. PREEMPT_RT Linux: A "Hardened" version where the system is forced to stop whatever it's doing immediately if a critical task (like keeping the drone stable) needs attention.

They also threw a "stress test" at the system: they made the computer do heavy math, fill up the memory, and juggle thousands of background tasks to simulate a real-world scenario where the drone is also doing computer vision and path planning.

The Results: The "Traffic Jam" vs. The "Express Lane"

1. The Standard Linux Disaster (The Traffic Jam)

When the standard Linux kernel was stressed, it behaved like a chaotic city intersection with no traffic lights.

  • The Problem: When the timer said "It's time to fly!", the standard kernel didn't wake up the drone task immediately. Instead, it put the request in a "to-do" list (called a SoftIRQ) and said, "I'll get to that when I'm done with this other thing."
  • The Result: Under heavy load, the drone task waited over 9 milliseconds to wake up.
  • The Analogy: Imagine you are a pilot in a cockpit. You press the button to fire a missile. Instead of firing instantly, the button sends a note to the janitor, who puts it in a pile, walks to the break room, gets coffee, and then tells the pilot to fire. By the time the missile fires, the target is gone. The drone would crash.

2. The PREEMPT_RT Success (The Express Lane)

When they switched to the PREEMPT_RT kernel, the system changed its behavior completely.

  • The Fix: This version treats the drone task like a VIP. As soon as the timer rings, the system immediately stops everything else, clears the desk, and wakes up the drone task.
  • The Result: The worst delay dropped from 9,000 microseconds down to 225 microseconds.
  • The Analogy: Now, when you press the button, a dedicated security guard (the Real-Time Kernel) immediately clears the hallway, pushes everyone else out of the way, and escorts the pilot straight to the controls. The drone flies smoothly.

The Twist: It's Not Just the Software (The "Noisy Neighbor")

Here is the most interesting part of the paper. Even with the "VIP Express Lane" (PREEMPT_RT), the drone wasn't perfectly smooth. There was still a tiny bit of jitter (wobble).

Why?
The researchers realized that even though the software was doing its job perfectly, the hardware was getting crowded.

  • The Analogy: Imagine the drone task is a VIP sitting in a private room (Core 2). The VIP is served instantly. However, the VIP's room shares a single water cooler and a hallway with the other three rooms (Cores 0, 1, and 3). When the other rooms are throwing a massive party (running heavy computer vision tasks), they are fighting over the water cooler and clogging the hallway.
  • The Consequence: Even though the VIP gets the "go" signal instantly, they have to wait a split second because the hallway is jammed with data traffic. This is called Memory Contention.

The Verdict: Is It Good Enough?

The researchers compared this "Single Brain" approach to the traditional "Dual Brain" approach (using a tiny microcontroller).

  • The Microcontroller: Is like a Swiss Army knife. It's tiny, cheap, and incredibly precise (jitter is almost zero). But it can't do complex math or see faces.
  • The Raspberry Pi 5 (with PREEMPT_RT): Is like a supercomputer. It's 10 times "noisier" (less precise) than the microcontroller, BUT it is precise enough to fly a drone safely.
    • The drone needs to react every 4 milliseconds.
    • The Raspberry Pi 5's worst delay was 0.225 milliseconds.
    • That leaves plenty of safety margin.

Conclusion: The Future of Drones

This paper proves that we can finally ditch the "two brains" setup for many drones. We can put the heavy lifting (AI, vision, planning) and the delicate flying (stabilization) on the same chip.

  • What works: Using a "Real-Time" version of Linux (PREEMPT_RT) turns a chaotic computer into a reliable pilot.
  • What's left to fix: The hardware itself (the memory and cache) still gets a bit crowded when doing heavy AI tasks. Future engineers will need to build better "traffic management" for the hardware to make it even smoother.

In short: You can now fly a drone using a powerful computer that does everything, as long as you tell that computer to be polite and stop what it's doing when the drone needs to fly.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →