the machinekernel 7.3.5
How the kernel works
The kernel is the only program that runs with full access to the hardware. Everything else — your shell, your browser, your compiler — asks it for favours through a small, stable interface. Click any layer to see what it does.
The stack
Read it from the top down: your program is furthest from the metal, the drivers are closest. Each boundary exists to turn something complicated into something simple — or to stop a mistake in one place from damaging another.
What happens when you read a file
cat welcome.txt is a program calling read() in a loop. Step through what the kernel actually does with that request.
1 · userspace calls read()
The same six steps cover almost every "why is this slow?" question: cache hit, cache miss, metadata lookup, device queue, or scheduling stall.
Scheduling: who runs next
A CPU core executes one thread at a time. The scheduler's job is to pick the next one often enough and fairly enough that interactive programs feel instant while batch work still finishes.
Linux runs a completely fair scheduler family (EEVDF replaced CFS in 6.6) built on a simple idea: track how much CPU time each runnable task has received, weighted by its nice value, and always run the task that has received the least. Interactive tasks that sleep often accumulate little time, so they are chosen immediately when they wake.
- nice (-20 to 19) shifts the weight. Lower is more CPU; only root can go negative.
- Real-time policies (SCHED_FIFO, SCHED_RR) bypass fairness entirely for tasks that must not wait.
- cgroups let a whole group be given a share, so one container cannot starve another.
- CPU affinity pins a task to specific cores, which matters for cache locality and for isolating latency-sensitive work.
Memory: virtual, lazy, cached
Every process sees its own contiguous address space. That is a lie maintained by the memory management unit: pages are mapped to physical frames on demand, and the mapping is what enforces isolation between processes.
- Virtual memory means a process can be given more address space than the machine has RAM, and can never address another process's memory.
- Demand paging means
mallocis cheap — pages are allocated when first touched, not when requested. - The page cache uses otherwise idle RAM to hold file contents. This is why "free" memory looks low on a healthy Linux machine, and why
free -hreports available separately. - Overcommit and the OOM killer: the kernel usually grants allocations it cannot guarantee, and when memory truly runs out it kills a process by heuristic. The
Killedmessage in a log is almost always this.
Seeing 15.6 GB total and 0.3 GB free is normal. Read the available column. Cache is memory doing useful work, and it is reclaimed instantly when a program needs it. Try free -h in the lab →
Isolation without virtual machines
A container is a process — or a tree of them — that has been given a restricted view of the system. Three kernel mechanisms do the work:
- Namespaces control visibility: PID, mount, network, IPC, UTS, user, cgroup and time. A process in a new PID namespace sees itself as PID 1.
- cgroups control resources: CPU shares, memory limits, I/O weight, and accounting.
- Capabilities, seccomp and LSM control permission: dropping root-like powers, filtering system calls, and applying policy (SELinux, AppArmor).
There is no hypervisor and no second kernel, which is why containers start in milliseconds and share the host's page cache. The trade-off is a shared kernel: a kernel bug is a shared risk, which is why seccomp profiles and user namespaces matter.
Modules, drivers and the "monolithic but modular" claim
Linux is monolithic: one kernel address space, direct function calls between subsystems, no message passing between servers. It is also modular: most drivers and filesystems can be loaded and unloaded at runtime.
That combination is the reason it can support an enormous range of hardware without the performance cost of a microkernel — and the reason a bad driver can crash the machine. Tools you will meet: lsmod, modprobe, dmesg, and /proc/modules.
How the kernel is built by other people
Roughly ten changes an hour, a release every eight to nine weeks, and thousands of contributors a quarter. The process that makes that possible is unusually simple:
- Subsystem maintainers collect patches in their own git trees.
- During the two-week merge window, Torvalds pulls those trees.
- Weekly release candidates accept fixes only — no new features.
- A stable release ships; stable and longterm branches then receive backported fixes.
The longterm branches are what distributions ship. kernel.org/releases lists the current six and their projected end-of-life dates.
The version ladder
Major numbers are milestones of scale, not redesigns. The dates are release dates.
| Version | Released | Why it is on this list |
|---|---|---|
| 0.01 | 17 Sep 1991 | First public release, 10,239 lines |
| 1.0 | 14 Mar 1994 | Networking, VFS, credible Unix |
| 2.0 | 9 Jun 1996 | Symmetric multiprocessing |
| 2.6 | 17 Dec 2003 | New scheduler and the modern release process |
| 3.0 | 21 Jul 2011 | Numbering reset; the cloud era begins |
| 4.0 | 12 Apr 2015 | Live patching, containers everywhere above it |
| 5.0 | 3 Mar 2019 | Numbering milestone, AMD and ARM server growth |
| 6.0 | 2 Oct 2022 | Cloud-native kernel work |
| 6.1 | 11 Dec 2022 | Rust support merged |
| 6.12 | 17 Nov 2024 | PREEMPT_RT in mainline; longterm |
| 6.18 | 30 Nov 2025 | Newest longterm, projected to Dec 2028 |
| 7.0 | 12 Apr 2026 | First 7.x kernel |
| 7.3 | 18 Oct 2026 | Current stable series (7.3.5, 17 Nov 2026) |