Hacker News new | ask | show | jobs
by cesarb 3072 days ago
When you're working in userspace, the kernel shields you from much of the hardware complexity. When you're working in kernelspace, the whole hardware complexity is visible; it has to worry about details no userspace code has to care about. It doesn't help that the Linux kernel is highly optimized, using tricks that are uncommon in user space (like self-modifying code; the "alternatives" mechanism overwrites instructions with a variant depending on the hardware, at boot or hotplug time), or highly complex lock-free code (like the "read-copy-update" mechanism).

My personal recommendation is to read the Linux Weekly News (https://lwn.net/) every week (if you don't want to subscribe, the previous week editions are available for free). It always has great explanatory articles about the Linux kernel internals, written by Linux kernel developers. For instance, this explanatory article about the "read-copy-update" mechanism, from the author of the Linux kernel implementation of that mechanism: "What is RCU, Fundamentally?" (https://lwn.net/Articles/262464/).