Why I'm going a layer down: kernel-level C as deliberate study
Writing small kernel-level software in C — not to ship a product, but to stop treating the operating system as a black box underneath everything I build.
Everything I've shipped lives on top of an abstraction I can't see into. I've debugged a container that died for reasons I could only guess at, tuned a service by changing numbers I didn't fully understand, and watched a process get killed with no mental model of who decided that. The fix for that isn't another framework.
So this is study with an artifact at the end, not a product. The goal is to be the person on a team who can say what the operating system is actually doing when something goes wrong at 2am, instead of restarting it.
Why C, specifically
Because at this layer there is nowhere to hide. No garbage collector deciding when memory goes away, no runtime catching a bad access, no exception to bubble up. Writing C against kernel interfaces forces an explicitness about memory, lifetimes and failure that I think makes me better at the higher-level work too — and it's the language the thing I'm trying to understand is written in.
What I'm actually reading toward
- How a process is really scheduled, and what the kernel knows that top doesn't show
- The syscall boundary — what crossing it costs and why that cost shapes every I/O design decision
- Memory: virtual to physical, page faults, and why the OOM killer picks what it picks
- Loadable modules as the smallest honest unit of kernel code I can write, build and break safely in a VM
This is the ideation phase, and that's the honest label
There is no code to show yet. I'm scoping a first module small enough to finish — the kind of thing that exposes one real piece of kernel state and teaches me the build, load and debug loop without turning into a project I abandon. I'd rather say that plainly than put a diagram here for something I haven't written.
It also connects to the other thing on this page. Getting a model to run as a native binary on a phone is already a systems problem — memory mapping, quantization because RAM is finite, a compiled toolchain instead of an interpreter. The deeper I go on the OS, the less of that feels like magic.
What's next
- Set up a VM I'm comfortable crashing repeatedly
- Get a trivial module to build, load and unload cleanly — the loop before the content
- Pick one piece of kernel state worth exposing and write that honestly
- Write up what I got wrong, which is the part these posts are actually for
- Status
- Ideation · reading and scoping the first module
- Stack
- C · Linux · Systems programming