Learning Resources
This module is populated from the local chunked books in library/raw/semester-05-os-networking/books. Use this page as a source map, not as an instruction to read everything.
Source Stack
| Book | Role | How to use it in this module |
|---|---|---|
| Operating Systems: Three Easy Pieces (Arpaci-Dusseau) | Primary teaching source | Default escalation for processes, scheduling policies, context-switch mechanics, and proportional-share; best for "how Linux actually does it" intuition |
| Operating System Concepts (Silberschatz, Galvin, Gagne) | Selective support for rigor | Use for formal definitions of scheduling metrics, real-time scheduling (RMS/EDF), and multi-processor scheduling approaches with case studies |
| Computer Networking (Kurose & Ross) | Not this module | Reserved for semester 5 networking modules |
| Unix Network Programming (Stevens) | Not this module | Reserved for semester 5 IPC/networking modules |
Resource Map by Cluster
Cluster 1: What a Process Is
| Need | Best local chunk | Why |
|---|---|---|
| operational intro to processes | OSTEP 4.1: The Abstraction: A Process | Clean, no-prerequisite description of what a process is |
| CPU virtualization framing | OSTEP 2.1: Virtualizing the CPU | Motivates why processes exist at all |
| process creation detail | OSTEP 4.3: Process Creation | Step-by-step creation walk-through |
| process states and transitions | OSTEP 4.4: Process States | The canonical 3+ state diagram with text |
| PCB and the process list | OSTEP 4.5: Data Structures | Actual xv6 struct proc shown in code |
fork semantics | OSTEP 5.1: The fork() System Call | Worked example of parent/child divergence |
exec semantics | OSTEP 5.3: The exec() System Call | Why exec replaces rather than returns |
| why fork/exec are separate | OSTEP 5.4: Why? Motivating the API | The shell-redirection argument |
| other process API | OSTEP 5.5: Other Parts of the API | wait, signals, and related calls |
| concepts-book framing | OS Concepts: Chapter 3 Processes | Textbook-style rigorous introduction |
| scheduling queues model | OS Concepts: 3.2.1 Scheduling Queues | Alternate framing: multiple queues per state |
| creation formally | OS Concepts: 3.3.1 Process Creation (Part 1) | Parent-child hierarchy and resource sharing |
| creation, part 2 | OS Concepts: 3.3.1 Process Creation (Part 2) | fork + exec with full example |
| process termination | OS Concepts: 3.3.2 Process Termination | Orphans, zombies, wait |
Cluster 2: CPU Scheduling Policies
| Need | Best local chunk | Why |
|---|---|---|
| scheduling problem setup | OSTEP 7.1: Workload Assumptions | FCFS, SJF, STCF derived step by step |
| response time as a metric | OSTEP 7.6: A New Metric: Response Time | Shows why turnaround alone is not enough |
| Round-Robin | OSTEP 7.7: Round Robin | Quantum tradeoff with numbers |
| MLFQ rules | OSTEP 8.1: MLFQ Basic Rules | The two core rules with motivation |
| MLFQ priority change | OSTEP 8.2: Attempt #1: How to Change Priority | Demotion and gaming the scheduler |
| MLFQ tuning | OSTEP 8.5: Tuning MLFQ | Realistic parameters and edge cases |
| MLFQ summary | OSTEP 8.6: MLFQ Summary | One-page recap of the full algorithm |
| concepts-book scheduling intro | OS Concepts: Chapter 5 CPU Scheduling | Clean uniprocessor framing |
| scheduling metrics | OS Concepts: 5.2 Scheduling Criteria | Utilization, throughput, turnaround, response, waiting defined |
| round-robin formal | OS Concepts: 5.3.3 Round-Robin | Second exposition of RR with worked averages |
| multilevel queues | OS Concepts: 5.3.5 Multilevel Queue | MLFQ's simpler non-feedback cousin |
Cluster 3: Scheduler Metrics and Fairness
| Need | Best local chunk | Why |
|---|---|---|
| metrics, applied | OSTEP 7.1: Workload Assumptions (metrics) | Turnaround formalized |
| response time in context | OSTEP 7.6: A New Metric: Response Time | Adds interactive workloads |
| proportional share intro | OSTEP 9.1: Tickets Represent Your Share | The fairness-as-share formulation CFS uses |
| ticket mechanisms | OSTEP 9.2: Ticket Mechanisms | Stride scheduling and alternatives |
| assigning tickets (shares) | OSTEP 9.5: How to Assign Tickets? | The unsolved policy question behind nice |
| proportional share summary | OSTEP 9.7: Summary | CFS-as-rigorous-proportional-share |
| metrics formalism | OS Concepts: 5.2 Scheduling Criteria | Rigorous metric definitions |
| multilevel queue / priorities | OS Concepts: 5.3.5 Multilevel Queue | Where priority classes live |
| rate-monotonic scheduling | OS Concepts: 5.6.3 Rate-Monotonic Scheduling | RMS schedulability test and example |
Cluster 4: Context Switching and Overhead
| Need | Best local chunk | Why |
|---|---|---|
| limited direct execution | OSTEP 6.1: Limited Direct Execution | Foundation: user mode vs kernel mode |
| restricted operations | OSTEP 6.2: Problem 1 - Restricted Operations | Traps and the syscall mechanism |
| switching, part 1 | OSTEP 6.3: Problem 2 - Switching | Why voluntary yield is not enough |
| switching, part 2 | OSTEP 6.3: Switching (Part 2) | Timer interrupts and forced preemption |
| switching, part 3 | OSTEP 6.3: Switching (Part 3) | The actual register-swap code |
| context-switch cost | OSTEP 6.5: Summary (HOWLONGCONTEXTSWITCHESTAKE) | Measured numbers for context-switch cost |
| TLB issue on switch | OSTEP 19.5: TLB Issue - Context Switches | Why TLB is the silent tax |
| concurrency intro | OSTEP 26: Concurrency: An Introduction | Sets up thread vs process |
| thread creation | OSTEP 26.1: Thread Creation | Two threads, one address space |
| shared data problem | OSTEP 26.2: Why It Gets Worse - Shared Data | Makes the "shared state" tradeoff concrete |
| cache management framing | OS Concepts: 1.5.5 Cache Management | Why caches matter for switch cost |
| threads & concurrency | OS Concepts: Chapter 4 Threads & Concurrency | Rigorous thread model |
| Linux threads | OS Concepts: 4.7.2 Linux Threads | How clone gives you thread-or-process |
Cluster 5: Scheduling in Modern Systems
| Need | Best local chunk | Why |
|---|---|---|
| single-queue pitfalls | OSTEP 10.4: Single-Queue Scheduling | Why one lock does not scale |
| multi-queue scheduling | OSTEP 10.5: Multi-Queue Scheduling | Per-CPU runqueues and balancing tradeoffs |
| multi-CPU summary | OSTEP 10.7: Summary | Consolidated multi-core policy |
| synchronization in scheduler | OSTEP 10.2: Don't Forget Synchronization | Lock-related multi-core pitfalls |
| proportional share summary | OSTEP 9.7: Summary | CFS internals connection |
| multi-processor approaches | OS Concepts: 5.5.1 Approaches to Multi-Processor Scheduling | Symmetric vs asymmetric, push vs pull |
| processor affinity | OS Concepts: 5.5.4 Processor Affinity | Soft vs hard affinity with examples |
| Linux CFS, part 1 | OS Concepts: 5.7.1 Example: Linux Scheduling (Part 1) | CFS structure and vruntime |
| Linux CFS, part 2 | OS Concepts: 5.7.1 Example: Linux Scheduling (Part 2) | Real-time classes and group scheduling |
| Windows scheduler | OS Concepts: 5.7.2 Example: Windows Scheduling | Priority-boost-style scheduler |
Exercise Support Chunks
Use these when concept pages are understood but fluency is weak:
- OS Concepts: Chapter 3 Exercises
- OS Concepts: Chapter 4 Exercises
- OS Concepts: Chapter 5 Practice Exercises
- OS Concepts: 5.8.3 Simulations
- OS Concepts: Programming Projects (Processes)
- OS Concepts: Programming Projects (Threads)
- OSTEP: CPU virtualization dialogue
External Resources (Read-If-Curious)
Only use these if you want a second exposition or deeper background. The module is completable from the local chunks alone.
- OSTEP Free Online (Remzi Arpaci-Dusseau) - free chapter PDFs including all of CPU virtualization and scheduling.
- LWN: The Linux CFS scheduler - historical but still the clearest writeup of why CFS replaced the O(1) scheduler.
- LWN: An EEVDF CFS replacement - modern evolution of CFS, useful context on scheduler design.
- Brendan Gregg: perf sched for Linux CPU scheduler analysis - practical diagnostic methods for scheduling latency.
- Priority Inheritance Protocols: The Mars Pathfinder Story - primary-source account.
- The kernel's sched-domains documentation - authoritative reference for the load balancer's topology model.
- Kubernetes CPU Management - how
requests/limitsmap to cgroup v2 controls in production. - Julia Evans: What happens when you start a process on Linux? - short, accessible, great companion reading for Concept 03.
Use Rules
- If you are stuck on what a process is or how it is created, start with OSTEP chapters 4-5 (Cluster 1 chunks).
- If you are stuck on scheduling policy mechanics, go to OSTEP chapters 7-9. OS Concepts 5.2 is the second escalation for formal metric definitions.
- If you are stuck on context-switch cost, OSTEP chapter 6 plus chapter 19.5 (TLB) cover it completely.
- If you need the formal real-time bound (RMS or EDF), OS Concepts 5.6.3 is the canonical reference.
- If you need production-relevant Linux detail (CFS, cgroups, containers), escalate to the external LWN and Brendan Gregg links -- the books do not cover cgroups v2 in depth.
- Open one chunk for one concept gap; do not drift through a whole chapter sequence.
- If re-reading does not fix the problem, run the experiment (Practice 1 Gantt exercise, Practice 3 context-switch estimate, or Kata 2). Physical measurement beats more reading.