Topic domain
Operating Systems
Resource management between hardware and programs.
- Articles
- 80
- Clusters
- 8
- Foundational
- 24
- Intermediate
- 32
- Advanced
- 24
Execution contexts, context switches, and states.
- Process States and the Transitions the Kernel Actually Tracks
- What fork Copies, and Why Copy-on-Write Defers Almost All of It
- What Threads Share and What They Own
- The Anatomy of a Context Switch
- Zombies, Orphans, and the Mechanics of Reaping
- Signal Delivery, Thread Masks, and Which Thread Runs the Handler
Scheduling
10Policy, fairness, and latency under load.
- Run Queues and the Cost of a Context Switch
- Tick Accounting and How a Slice Is Measured
- Multi-Level Feedback Queues and Priority Decay
- Virtual Runtime and Weighted Fair Queuing
- Load Balancing and Thread Migration on Symmetric Multiprocessors
- Priority Inversion and Inheritance
Locks, futexes, and memory ordering.
- Atomic Read-Modify-Write and the Mutual Exclusion Problem
- Acquire and Release Ordering: What a Lock Actually Guarantees About Memory
- Condition Variables and the Lost Wakeup Problem
- Futex Wait and Wake: How a Lock Sleeps Without a Syscall on the Fast Path
- Spinlock Contention: Ticket Ordering and MCS Queues
- Reader-Writer Locks and the Starvation They Invite
System Calls
10The kernel boundary and its cost.
- How a System Call Transfers Control to the Kernel
- System Call ABIs and the Register Argument Convention
- Error Returns and the errno Convention
- What a System Call Actually Costs
- The vDSO and System Calls That Never Trap
- Copying Data Across the User-Kernel Boundary
Deferred work, softirqs, and clock sources.
- How a Hardware Interrupt Reaches a Handler on x86-64
- From Hardware Line to Virtual IRQ Number
- Interrupt Controllers from the 8259A to Message-Signalled Interrupts
- Top Halves and Bottom Halves
- Softirqs and the Per-CPU Deferred Queue
- Clock Sources, Clock Events, and the Tick
Firmware handoff, init, and early boot.
- The Reset Vector and the First Instruction Executed
- How Firmware Describes Physical Memory to the Kernel
- Why Boot Loaders Are Split Into Stages
- Entering Long Mode From a Boot Loader
- Kernel Decompression and Physical Relocation
- Early Console Output Before Drivers Exist
Containers, chroots, and resource limits.
- Chroot Confines Path Resolution, Not the Process
- Mount Namespaces and the Propagation of Mount Events
- PID Namespaces and the Special Status of PID 1
- User Namespaces and the Mapping of UIDs
- Network Namespaces and Virtual Ethernet Pairs
- Control Groups v2: How Memory and CPU Limits Are Enforced
Modules, debugging, and portability.
- How a Loadable Module Resolves Symbols Against the Kernel
- Kconfig Options and the Shape of the Compiled Kernel
- Kernel Logging: The Ring Buffer Behind printk
- Stack Unwinding in the Kernel Without Frame Pointers
- Dynamic Tracing by Rewriting Instructions: ftrace and kprobes
- Lockdep: Proving Lock Order Without Running the Deadlock
All Operating Systems articles
- Oct 23, 2026 How a Loadable Module Resolves Symbols Against the Kernel A module is an unlinked ELF object, not a program. How the loader binds its undefined names, why exported symbols carry version CRCs, and what vermagic refuses to load.
- Oct 8, 2026 Stack Unwinding in the Kernel Without Frame Pointers Walking a call stack whose compiler optimised away the frame pointer, the unwind tables that replace it, and why unwinding from an interrupt frame needs a different entry point.
- Sep 24, 2026 32-bit Compatibility System Calls on a 64-bit Kernel How one kernel serves two pointer widths, why the compatibility entry path differs from the native one, and where the translation layer leaks.
- Aug 31, 2026 Spinlock Contention: Ticket Ordering and MCS Queues Why a test-and-set spinlock makes every waiter hammer one cache line, how a ticket lock restores first-come order, and why a queue of per-thread flags beats both.
- Aug 13, 2026 NAPI and Interrupt Mitigation How a network driver switches from one interrupt per packet to a budgeted poll, what the weight and time limits protect, and where the scheme loses packets.
- Aug 7, 2026 Process States and the Transitions the Kernel Actually Tracks Why the kernel keeps a bitmask rather than a state enum, how runnable differs from running, and what the letter printed by ps leaves out.
- Jul 29, 2026 Thread Stacks, Guard Pages, and Thread-Local Storage How a thread stack is reserved, why a guard page turns overflow into a fault, and how a per-thread block is addressed without a lookup.
- Jul 22, 2026 Interrupt Controllers from the 8259A to Message-Signalled Interrupts Why interrupts moved from shared wires and acknowledge cycles to memory writes, and what the older controllers still constrain in a modern machine.
- Jul 21, 2026 Kernel Logging: The Ring Buffer Behind printk Why kernel messages are written to a fixed circular buffer instead of a file, how records are framed, and what happens when the console cannot keep up with the producer.
- Jun 29, 2026 Restartable Sequences and Interruption Semantics How the kernel restarts an interrupted call, why a userspace critical section needs a kernel abort hook, and what the abort path guarantees.
- Jun 24, 2026 Capabilities and the Decomposition of Root Privilege How the single root check was split into distinct capabilities, how the permitted, effective and inheritable sets interact across execve, and why file capabilities and no_new_privs change the rules.
- Jun 16, 2026 From the First Kernel Thread to PID 1 How the kernel creates its initial task, what changes when that task returns to user mode, and why the first user-space process must be a single-threaded, privileged program that never exits.
- Jun 2, 2026 System Call ABIs and the Register Argument Convention How arguments and return values cross the privilege boundary, why there are at most six of them, and why two ABIs on one machine can disagree about the layout of a struct.
- May 17, 2026 How Firmware Describes Physical Memory to the Kernel The E820 and UEFI memory map formats, why reserved ranges outnumber usable ones, and how the kernel turns a list of address ranges into its own page allocator.
- May 12, 2026 Signal Delivery, Thread Masks, and Which Thread Runs the Handler How the kernel chooses a thread for a process-directed signal, why the mask is per thread while the handler is shared, and where the choice becomes deterministic.
- May 5, 2026 Run Queues and the Cost of a Context Switch How the kernel tracks which threads can run, why each CPU keeps its own queue, and what a switch actually costs beyond saving and restoring registers.
- May 3, 2026 Chroot Confines Path Resolution, Not the Process What the chroot call changes in the kernel, why a process that keeps a directory descriptor can walk out of the new root, and which guarantees the call does and does not provide.
- Apr 24, 2026 Priority Inversion and the Protocols That Bound It How a low-priority lock holder can block a high-priority thread indefinitely, what inheritance and ceiling protocols each guarantee, and why both need the scheduler inside the lock.
- Apr 15, 2026 Word Size, Endianness, and Structure Layout Across Architectures Why the same C source produces different bytes on a 32-bit and a 64-bit build, how endianness changes on-disk and on-wire structures, and where alignment padding hides.
- Mar 31, 2026 How a Hardware Interrupt Reaches a Handler on x86-64 The gate descriptor lookup, the privilege transition, and the stack switch that carry a device signal into kernel code, and what each step costs.
- Mar 25, 2026 Control Groups v2: How Memory and CPU Limits Are Enforced Where the kernel charges a page to a cgroup, what happens when the charge exceeds the limit, and why CPU bandwidth control throttles rather than blocks.
- Mar 20, 2026 Condition Variables and the Lost Wakeup Problem Why checking a predicate and then sleeping is not atomic, how a condition variable closes the window with the mutex it is paired with, and why the wait must be a loop.
- Mar 14, 2026 Seqlocks: Optimistic Reading Without Blocking the Writer How a version counter lets readers copy shared data without registering, why the writer never waits, and which data types make the retry loop impossible to get right.
- Feb 25, 2026 Early Console Output Before Drivers Exist How a kernel prints messages before it has a driver for any display or serial device, why the framebuffer left by firmware is the usual answer, and what early output costs when it is a polling loop.
- Feb 17, 2026 Read-Copy-Update: Publishing New Versions and Waiting Out Old Readers How RCU lets readers run without any synchronization instruction at all, what a grace period must prove before memory can be freed, and where the approach stops working.
- Feb 13, 2026 io_uring and Shared-Memory Submission Queues How a pair of ring buffers mapped into the process removes most system calls from an I/O path, and which costs remain once the traps are gone.
- Feb 2, 2026 Softirqs and the Per-CPU Deferred Queue How the fixed softirq vector set, the per-CPU pending mask, and the budgeted processing loop cooperate, and why running twice on one CPU is a bug rather than a race.
- Jan 26, 2026 Top Halves and Bottom Halves Why an interrupt handler cannot sleep, how the split between immediate and deferred work is drawn, and what each deferral mechanism costs in latency and context.
- Jan 15, 2026 Futex Wait and Wake: How a Lock Sleeps Without a Syscall on the Fast Path How a 32-bit word in user memory plus a hashed kernel wait queue gives uncontended locks no kernel entry at all, and what requeue and priority inheritance add for the contended cases.
- Jan 9, 2026 EDF, Utilization Bounds, and Schedulability Tests Why earliest-deadline-first reaches full utilization on one CPU, how the density test differs from the utilization test, and what breaks when deadlines exceed periods.
- Dec 25, 2025 Error Returns and the errno Convention Why the kernel signals failure with a negative value in the result register, how the C library turns that into errno, and which failures a caller cannot distinguish.
- Dec 5, 2025 Copying Data Across the User-Kernel Boundary Why the kernel cannot simply dereference a pointer supplied by a program, how the copy routines validate and fault, and where the bytes actually go.
- Dec 2, 2025 Interrupt Delivery Inside a Virtual Machine Why injecting an interrupt into a guest can cost a world switch, how posted interrupts and APIC virtualization remove that cost, and what remains expensive.
- Nov 19, 2025 User-Level Threads and the M:N Scheduling Problem How a runtime multiplexes many logical threads over few kernel threads, why a blocking system call breaks it, and what stack growth costs.
- Oct 21, 2025 Acquire and Release Ordering: What a Lock Actually Guarantees About Memory How store buffers and compiler reordering let a consumer observe a published value before the data it points to, and how release and acquire operations restore the ordering without a full fence.
- Oct 16, 2025 Priority Inversion and Inheritance How a low-priority lock holder can stall a high-priority thread, why inheritance repairs the ordering, and what it costs in unlock complexity and chained blocking.
- Oct 3, 2025 Reader-Writer Locks and the Starvation They Invite How a shared-exclusive lock counts readers in one word, why an unbroken stream of readers can postpone a writer indefinitely, and which fairness schemes actually bound the wait.
- Sep 19, 2025 Time Namespaces and the State That No Namespace Covers How a time namespace shifts the monotonic and boottime clocks without changing the wall clock, and which kernel resources remain global no matter how many namespaces a process joins.
- Sep 8, 2025 Decoding a Kernel Fault Report What the register dump, the faulting address, and the call trace each establish, how to tell a null dereference from a use-after-free, and why a tainted kernel changes the reading.
- Sep 1, 2025 kexec and Crash Dumps: Capturing a Dead Kernel Booting a second kernel from the first, reserving memory that survives the handover, and why the dump kernel must not touch the crashed one's state.
- Aug 12, 2025 User Namespaces and the Mapping of UIDs How a process can hold full privilege over a subtree of the process hierarchy while holding none outside it, and what the uid_map translation table does at each syscall boundary.
- Jul 31, 2025 Measuring and Bounding Interrupt Latency What latency means at each point between a device asserting and a thread running, which mechanisms inflate the tail, and why the distribution rather than the average is the design target.
- May 25, 2025 seccomp-BPF and the Filtering of System Calls How a BPF program attached to a process inspects syscall numbers and arguments before dispatch, why argument filtering cannot dereference pointers, and what the return actions cost.
- May 12, 2025 Live Patching a Running Kernel: The Consistency Problem Redirecting a function to a replacement is easy; deciding when no thread is still inside the old one is not. How quiescence is established and why stacks must be checked.
- May 6, 2025 Atomic Read-Modify-Write and the Mutual Exclusion Problem Why a flag plus a check cannot keep two threads out of the same critical section, and what a single indivisible read-modify-write instruction changes about the problem.
- May 3, 2025 POSIX Real-Time Priority Classes and the Bandwidth Cap What SCHED_FIFO and SCHED_RR actually guarantee, why an unprivileged process cannot use them freely, and how a runtime cap keeps a runaway real-time thread from hanging the machine.
- Apr 30, 2025 Load Balancing and Thread Migration on Symmetric Multiprocessors How per-CPU run queues are kept in balance without a global lock, when a thread is worth moving, and why affinity and NUMA topology constrain the answer.
- Apr 5, 2025 Kconfig Options and the Shape of the Compiled Kernel How a configuration symbol turns into preprocessor structure, why IS_ENABLED differs from #ifdef, and how a build-time option silently changes struct layout and the module ABI.
- Mar 12, 2025 Lockdep: Proving Lock Order Without Running the Deadlock How the kernel records which lock classes are taken while holding which others, why a cycle in that graph is a proof, and what the validator cannot see through.
- Mar 3, 2025 The Anatomy of a Context Switch Which registers are saved, where they go, why the switch costs more than the save, and how address-space tags avoid flushing the translation cache.
- Feb 24, 2025 Timer Wheels and the Cost of Finding the Next Expiry Why a sorted list or a heap is the wrong structure for thousands of concurrent timers, how a hashed wheel amortises the work, and what the resolution trade costs.
- Feb 18, 2025 Kexec: Booting a Second Kernel Without Firmware How a running kernel loads a replacement image into reserved memory, what the relocation blob does during the jump, and why the crash kernel needs its own reservation and its own devices.
- Jan 8, 2025 Assembling a Container Root with pivot_root and Overlay Mounts Why chroot is the wrong tool for changing a container root, how pivot_root swaps the namespace root atomically, and how an overlay upper layer turns a read-only image into a writable filesystem.
- Dec 2, 2024 PID Namespaces and the Special Status of PID 1 How PID numbers become per-namespace identifiers, why the first process in a new namespace cannot be killed from inside it, and how namespace teardown depends on that process exiting.
- Oct 16, 2024 Network Namespaces and Virtual Ethernet Pairs How a process gets a private set of interfaces, routes and firewall rules, and how a veth pair connects that private stack to the host without either side sharing a socket table.
- Oct 16, 2024 The vDSO and System Calls That Never Trap How a read-only code page mapped into every process serves clock and CPU queries without a privilege transition, and what that costs in portability.
- Sep 25, 2024 Tick Accounting and How a Slice Is Measured Timer interrupts, sampled versus switch-time accounting, and why the kernel charges time at coarse granularity to the thread that happened to be running.
- Sep 17, 2024 From Hardware Line to Virtual IRQ Number How the kernel maps a controller-specific interrupt source onto a stable software number, what the irq_desc and irq_chip split buys, and why shared lines need an action list.
- Aug 18, 2024 Lock-Free Reclamation: ABA, Tagged Pointers, and Hazard Pointers Why a compare-and-swap pop can succeed against a pointer that was freed and reused, and what tagging, hazard pointers, and epoch schemes each cost to close that hole.
- Jul 6, 2024 Clock Sources, Clock Events, and the Tick The two abstractions behind kernel time: hardware that can be read for a timestamp, hardware that can raise an interrupt at a chosen moment, and the periodic tick built from the second.
- Jul 5, 2024 Virtual Runtime and Weighted Fair Queuing Why fair schedulers compare virtual clocks rather than wall time, how nice values become weights, and what granularity does to the fairness guarantee.
- Jun 20, 2024 What Threads Share and What They Own A thread is a process that was created with fewer sharing flags, and the list of flags is the whole difference. What each shared resource costs.
- Jun 10, 2024 Seccomp Filters and the Cost of Interception How a classic BPF program attached to a thread filters system calls, what it can and cannot inspect, and why tracing every call changes latency by orders of magnitude.
- Feb 19, 2024 What fork Copies, and Why Copy-on-Write Defers Almost All of It How the kernel duplicates an address space by sharing page frames read-only, what a write does to break the sharing, and why fork without exec is expensive.
- Feb 6, 2024 Hierarchical Fair Share and Lag Accounting How group scheduling keeps one container from multiplying its share by spawning threads, what lag measures, and why the bound is per-level rather than global.
- Jan 20, 2024 Entering Long Mode From a Boot Loader The exact register sequence that turns on 64-bit addressing on x86-64, why paging must be enabled in the same instruction that commits to long mode, and the page tables that must exist beforehand.
- Jan 19, 2024 Measured Boot and the Chain of Trust From Firmware to Kernel How each boot stage hashes the next into a TPM before executing it, why the measurements go into append-only PCRs, and what an attestation actually proves about a running system.
- Jan 18, 2024 Deadline Servers and Admission Control How a constant-bandwidth server gives any thread a deadline without trusting its behaviour, and why the admission test is what turns a priority into a guarantee.
- Jan 7, 2024 The Reset Vector and the First Instruction Executed Why an x86 processor begins executing at 0xFFFFFFF0 in real mode, how that address reaches the firmware ROM, and what the sixteen bytes at the top of memory must contain.
- Dec 26, 2023 Why Boot Loaders Are Split Into Stages The 512-byte first sector, the real-mode address space that constrains where a second stage can live, and how chainloading hands control from firmware to a loader to a kernel.
- Nov 27, 2023 What a System Call Actually Costs Where the cycles go between the trap instruction and the return, which costs are fixed and which scale with the argument, and why mitigations changed the baseline.
- Sep 20, 2023 Process Groups, Sessions, and the Controlling Terminal How job control is built from two identifiers, why a background job stops when it reads, and how a session leader loses its terminal.
- Sep 19, 2023 Kernel Decompression and Physical Relocation Why a compressed kernel image relocates itself before decompressing, how the position-independent stub finds free memory, and what has to change in the page tables when the kernel moves.
- Sep 14, 2023 How a System Call Transfers Control to the Kernel What the x86-64 syscall instruction actually changes, why the kernel cannot switch stacks for free, and how the two return paths back to user mode differ.
- Aug 3, 2023 Zombies, Orphans, and the Mechanics of Reaping Why an exited process keeps a task structure, what the wait call does to release it, and how subreapers keep orphaned descendants from accumulating.
- Jun 28, 2023 Thread Cancellation, Cleanup Handlers, and Deferred Delivery Why cancellation is a request rather than a kill, what a cancellation point is, and how cleanup handlers unwind a thread without leaking its resources.
- Dec 18, 2022 Unpacking an Initramfs and Switching to the Real Root How the kernel unpacks a compressed cpio archive into a temporary filesystem, what pivot_root and switch_root change, and why the old root cannot simply be unmounted.
- Aug 29, 2022 Dynamic Tracing by Rewriting Instructions: ftrace and kprobes How a function is instrumented without recompiling it, what a five-byte jump patch implies for concurrent execution, and why probing an instruction needs a copy of it somewhere else.
- Jun 18, 2022 Multi-Level Feedback Queues and Priority Decay How a set of priority queues plus a demotion rule approximates shortest-job-first without knowing job lengths, and the gaming and starvation problems that follow.
- Mar 23, 2022 Mount Namespaces and the Propagation of Mount Events How each process gets its own mount table, why a mount made in one namespace can appear in another, and what the shared, slave, private and unbindable propagation flags actually control.