Book Exercise Lanes
This module's exercise system is book-driven plus hands-on. Use these local chunks and hands-on tasks for targeted volume after you have already learned the concept from the guide.
How To Use This Page
- Finish the relevant concept page first.
- Do at least one paper trace from memory.
- Only then open the matching exercise lane.
- Keep a mistake log with tags such as
confused fd with inode,wrong crash ordering,skipped directory fsync,dirty page not flushed,select used where epoll belongs,edge-triggered drain loop missing, orassumedcloseimplies fsync.
Lane 1: The File Abstraction (inodes, directories, FDs)
Use this lane when the issue is the three-layer kernel table model or directory semantics.
- OSTEP: Files and directories
- OSTEP: Reading and writing files
- OSTEP: Non-sequential reading and writing
- OSTEP: Making directories
- OSTEP: Hard links
- OSTEP: Symbolic links
- OSTEP: Making and mounting
- OSTEP: Directory organization
- OSTEP: Aside - the inode data structure
Target outcomes:
- 8
stat/ls -litraces (inode number, link count changes) performed on real files - 4
fork+ shared-FD drills with predicted and observed behavior - 2 directory-lookup traces from mount point to target inode
Lane 2: On-Disk Layout and Archetypes
Use this lane when you cannot draw the on-disk structure or trace a read to an LBA.
- OSTEP: The interface
- OSTEP: A simple disk drive
- OSTEP: I/O time math
- OSTEP: The way to think
- OSTEP: Overall organization
- OSTEP: Access paths
- OSTEP: Poor performance (FFS motivation)
- OSTEP: Cylinder groups
- OSTEP: Allocation policies
- OSTEP: Measuring file locality
- OSTEP: Large file exception
- OSTEP: LFS - writing to disk sequentially
- OSTEP: LFS - sequentially and effectively
- OSTEP: LFS - inode map
- OSTEP: LFS - garbage collection
Target outcomes:
- 6 hand-drawn ext-style layouts with addresses and sizes
- 4
readtraces from inode + offset to LBA - 2 comparisons of ext vs LFS on the same workload (append-heavy, random-update-heavy)
Lane 3: Crash Consistency
Use this lane when you cannot reason about post-crash state for multi-step operations.
- OSTEP: A detailed example
- OSTEP: fsck
- OSTEP: Data journaling
- OSTEP: Forcing writes to disk
- OSTEP: Optimizing log writes
- OSTEP: Optimizing log writes (part 2)
- OSTEP: Other approaches
- OSTEP: ZFS
- OSTEP: Copy-on-write mappings
- OSTEP: Journaling file system appendix
- OSTEP: Disk failure modes
- OSTEP: Detecting corruption
- OSTEP: Misdirected writes
- OS Concepts: Consistency checking
- OS Concepts: Linux ext3
Target outcomes:
- 6 operations (append, overwrite, rename, unlink, mkdir, hard-link) with crash-state tables for naive, journaled, and COW
- 4 written "worst case" crash narratives with recovery steps
- 2 correct implementations of "durable atomic file replacement" pattern
Lane 4: I/O Models and Performance
Use this lane when you cannot pick between blocking, epoll, and io_uring, or cannot measure I/O performance.
- UNP: I/O models
- UNP: select function (part 1)
- UNP: select function (part 2)
- UNP: select function (part 3)
- UNP: Advanced polling (part 1)
- UNP: Advanced polling (part 2)
- OSTEP: System architecture
- OSTEP: The canonical protocol
- OSTEP: DMA
- OSTEP: Device driver
- OSTEP: IDE case study
- OSTEP: Disk scheduling
- OSTEP: Caching and buffering
- OS Concepts: Direct memory access
- OS Concepts: I/O scheduling
- OS Concepts: Transforming I/O requests
Target outcomes:
- a single-threaded
epollecho server handling 1k+ connections - a measurement report of
fsynccost across at least 4 modes - a short comparison of
select,epoll, andio_uringfrom your own run, with CPU and throughput numbers - 2 written debugging narratives from
strace,iostat, orblktraceon your own workload
Self-Curated Problem Set
Build a custom set with these minimums:
- 5 crash-consistency scenarios across naive / journaled / COW
- 5 layout tracing exercises (inode + offset -> LBA)
- 5
fork/dup/openbehavior predictions, verified in code - 5 I/O performance measurement tasks (cache-hot, cache-cold, sequential, random,
fsyncon/off) - 3 server builds (thread-per-conn,
epoll,io_uring) and a comparison
Completion Checklist
- Completed at least one lane in full
- Built the FUSE FS kata
- Built the
epollecho server kata - Produced the
fsync-cost table kata - Produced the crash-recovery simulator kata
- Logged at least 10 real mistakes and corrections
- Read
strace,iostat, orblktraceoutput on your own workload at least twice