This is what it cost me.
How the Idea Actually Started
I remember sitting in my Operating Systems lecture, staring at a Gantt chart on the whiteboard.
The professor was explaining scheduling algorithms. Task A runs for 10ms. Task B preempts it. Task C waits. The CPU utilization formula was perfect. The math added up. The system would work.
It looked clean. Almost elegant.
But as I walked back to my dorm, one thought refused to leave:
Theory is clean. Linux is messy.
In the real world, you don't have perfect periods. You have cache misses. You have interrupt latency. You have spinlocks and race conditions nobody planned for. Reading about scheduling wasn't enough anymore. I didn't want to calculate it on paper.
I wanted to see it.
So the thought formed naturally:
What if I just built a real-time scheduler and forced all of this to happen in front of me?
At the time, it stayed just that — a thought.
From Thought to Project
The thought became impossible to ignore after I came across the story of the Mars Pathfinder mission.
In 1997, a software bug nearly ended the mission. A low-priority task held a mutex. A high-priority task waited for it. A medium-priority task kept running, starving everything else. The rover started resetting itself on Mars — 309 million kilometers from the nearest engineer.
The bug had a name: Priority Inversion. It was the exact thing my professor's clean Gantt charts had never accounted for.
When I realized that a scheduling concept from my Operating Systems lecture had nearly ended a space mission, I stopped feeling delusional for wanting to understand it properly.
That's when the thought stopped being a thought and became Arbiter.
What Arbiter Actually Does
At a high level, Arbiter:
- Spawns three periodic threads — High, Medium, and Low priority — and makes them compete for the CPU
- Routes all timing logs through a custom Linux Kernel Module, not printf
- Runs a schedulability feasibility test before any task is allowed to start
- Implements the Priority Ceiling Protocol to neutralize priority inversion in real time
- Handles aperiodic tasks triggered by real runtime events
Simple.
Right?
The Lowest Point
The lowest point wasn't a concept I didn't understand.
It wasn't a failed test case.
It was a kernel panic at 1 AM with no error message I could parse — and a terminal that just went blank.
Most of the system was already built, which somehow made it worse. I remember thinking:
What's the point? The kernel doesn't care what I want.
Some days I chased a single segmentation fault for hours, tracing through layers of kernel code I barely understood. Other days I didn't work at all.
That's the part nobody talks about when they describe learning systems programming. The documentation assumes you already know what you're doing. The error messages assume you can read assembly. The kernel panics assume you have a sense of humor about losing your work.
I didn't, for a while.
What I Learned (The Honest Part)
Building Arbiter taught me things that no lecture ever could:
- printf is a liar. It's buffered. In a real-time system, a log that arrives 5ms late might as well not exist. You have to go lower.
- User Space is a suggestion. Kernel Space is the law. You can ask the OS for things in C, but the kernel decides when they actually happen.
- Synchronization is not free. Every mutex lock costs time. In real-time systems, that cost must be calculated — not assumed away.
- The hardest bugs don't crash loudly. They just behave wrong. Priority inversion doesn't throw an exception. It quietly starves your most important task while something irrelevant runs.
Most importantly:
Building something that panics the kernel teaches you more in a week than reading about it does in a semester.
What I'm Actually Proud Of
Here's the part I don't downplay.
This system was built entirely on my own initiative.
- No step-by-step tutorial for this exact setup
- No blog post explaining how to write a kernel character device driver for real-time logging
- No YouTube playlist titled "Build a Hard RTOS Simulator in 10 Hours"
I had to read kernel documentation, trace through crash logs, and make design decisions that no assignment had ever prepared me to make.
Is it production-ready? No.
Did it kernel panic? Many times.
Does it work? Also yes.
If you're building something low-level and it feels harder than expected — that's not a red flag. That's the kernel telling you you're learning something real.
Project Link
You can check out the project here:
👉 GitHub: Arbiter
Happy coding.