CS:APP Lab Notes¶
CMU 15-213 · Computer Systems
From a single bit flip to a concurrent web proxy. Source-backed notes on the implementations, design choices, and the why behind them.
Start with Data Lab → · Source on GitHub
The Labs¶
Data Lab¶
Integer and floating-point operations built from bitwise primitives only, under strict operator-count limits.
Bomb Lab¶
Defusing a binary bomb phase by phase in GDB, reading x86-64 assembly, and cracking a hidden stage backed by a binary tree.
Attack Lab¶
Hijacking control flow through stack buffer overflows — from code injection to a ROP chain that defeats NX and ASLR.
Cache Lab¶
An LRU cache simulator written from scratch, then a blocked matrix transpose tuned to drive misses to the floor.
Shell Lab¶
A job-control Unix shell, with signal masking around the fork/addjob race.
Malloc Lab¶
malloc/free/realloc from the ground up, six designs deep — from one implicit list to twelve segregated rings.
Proxy Lab¶
An HTTP proxy that parses absolute URIs, rewrites hop-by-hop headers, and caches full responses under an approximate LRU policy.
SFS Lab¶
A small mmap-backed file system with atomic rename, open-file lifetime tracking, and synchronization, with finer-grained locking as an optional refinement.
About these notes¶
The first seven entries follow CMU's Computer Systems: A Programmer's Perspective (3rd ed.); SFS Lab is a separate file-system extension and is explicitly marked as AI-assisted. Every completed solution was run against its grader, with the result shown at the top of the writeup.