Operating Systems · Cluster
Processes and Threads
Execution contexts, context switches, and states.
- 01 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.
- 02 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.
- 03 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.
- 04 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.
- 05 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.
- 06 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.
- 07 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.
- 08 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.
- 09 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.
- 10 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.