Operating Systems (Phase 1 §3)¶
This course explains the Linux mechanisms between your VLA runtime and the devices it uses. Start after computer architecture; use its memory hierarchy model to distinguish scheduling delay, CPU page faults, device DMA, and accelerator execution.
The repository contains 26 original roadmap lectures plus eight optional consolidation notes. Caltech CS124 and Stanford Pintos are supplementary OS resources; their topic numbering is not the numbering below.
Study sequence and evidence¶
| Lectures | Question to answer | Artifact carried into the next group |
|---|---|---|
| 1–5: kernel, processes, interrupts, syscalls, boot | How does an application request a device operation? | Annotated boot handoff diagram; an actual boot/IRQ trace when a target is available |
| 6–11: scheduling and synchronization | Why did a ready task miss its deadline? | Periodic-worker trace with execution, waiting, and contention separated |
| 12–16: virtual memory, allocation, DMA, NUMA | Which address and ownership domain contains each buffer? | Buffer table: CPU virtual address, DMA address, lifetime, synchronization |
| 17–20: drivers and I/O | How is work submitted, completed, and reclaimed? | Device probe map and completion timeline |
| 21–24: storage, OTA, containers, deployed systems | What survives restart, isolation, and resource pressure? | Recoverable image/service configuration and failure log |
| 25–26: Yocto and eBPF integration | Can another engineer reproduce and diagnose the system? | Pinned metadata inputs and a compiled tracer; runtime tracing is a separate milestone |
Use rt-demo after L9 and the native bounded SPSC queue with L10. The queue tests full/empty/wrap behavior, actual threaded transfer, lifetime checks, and an intentional overwrite defect. Start without elevated scheduling privileges; compare load conditions before changing policy. A good latency histogram is evidence for the tested workload, not proof of a hard real-time bound. Record kernel version/configuration because implementation details and available tracing features vary.
The BPF build lab adds an optional native-tool milestone after L26: compile a real object/skeleton/reader, inspect its sections, and test input rejection without attaching to the kernel. It complements the executed SPSC and timer exercises. Follow the review/evidence matrix to see which concepts have native checks and which still need target hardware or privileged runtime validation.
Lecture index¶
| # | Actual lecture in this repository |
|---|---|
| 1 | Modern OS Architecture & the Linux Kernel |
| 2 | Processes, task_struct & the Linux Process Model |
| 3 | Interrupts, Exceptions & Bottom Halves |
| 4 | System Calls, vDSO & eBPF |
| 5 | Kernel Modules, Boot Process & Device Tree |
| 6 | CPU Scheduling: CFS, EEVDF & Real-Time Classes |
| 7 | Real-Time Linux: PREEMPT_RT & Determinism |
| 8 | Multi-Core Scheduling, CPU Affinity & isolcpus |
| 9 | Synchronization: Spinlocks, Mutexes, RW Locks & Seqlocks |
| 10 | Lock-Free Programming: RCU, Atomics & Memory Ordering |
| 11 | Deadlock, Priority Inversion & PI Mutexes |
| 12 | Virtual Memory & the Linux Memory Model |
| 13 | Page Tables, TLBs & Huge Pages |
| 14 | Memory Allocation: SLUB, kmalloc & CMA |
| 15 | DMA, IOMMU & GPU Memory Management |
| 16 | NUMA Topology & HPC Memory Optimization |
| 17 | Linux Device Driver Model & Device Tree |
| 18 | Character Drivers, Interrupt-Driven I/O & V4L2 |
| 19 | Modern I/O: io_uring, DMA-BUF & Zero-Copy Pipelines |
| 20 | PCIe, NVMe & GPU Driver Architecture |
| 21 | Filesystems: ext4, btrfs, F2FS & overlayfs |
| 22 | Embedded Storage: eMMC, UFS, NVMe & OTA Partitioning |
| 23 | Containers, cgroups v2 & NVIDIA Container Runtime |
| 24 | OS for AI Systems: L4T, openpilot OS & RT Tuning |
| 25 | Capstone Project — Custom Linux Images with Yocto |
| 26 | eBPF — Programmable Kernel Observability & Networking |
Integration lab: follow one observation to one action¶
Model a camera producer, inference worker, and controller as separate stages with bounded queues. Put a monotonic timestamp and sequence number on every item. Deliberately delay the inference worker; show whether the controller receives an old observation, a dropped item, or an explicit timeout. Explain the queue policy and account for each buffer until its final consumer releases it.
A complete submission includes timestamps for capture, dequeue, device submission, device completion, and command publication; p50/p95/p99 latency and deadline misses; and one trace demonstrating the cause of an outlier. State which stages are simulated. This becomes the runtime contract for embedded Linux and the host-side baseline for parallel computing.
Reference and review¶
- Final practice problems with answer key.
- Linux DMA API guide: address translation, mapping, ownership, and memory ordering.
- Linux EEVDF scheduler documentation: distinguish fair scheduling from deadline guarantees.
- AGNOS code-reading guide: compare lecture concepts with a real vendor kernel and image build.
Use the shared completion rubric to separate explanation, reproduced experiments, and hardware work still to do.