CS:APP Lab Notes¶
From a single bit flip to a concurrent web proxy. Source-backed notes on the implementations, design choices, and the why behind them.
The Labs¶
-
01 · Data btest 36/36
Data Lab¶
Integer and floating-point operations built from bitwise primitives only, under strict operator-count limits.
-
02 · Reverse Eng. defused
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.
-
03 · Exploits 5/5 pass
Attack Lab¶
Hijacking control flow through stack buffer overflows — from code injection to a ROP chain that defeats NX and ASLR.
-
04 · Memory 53/61
Cache Lab¶
An LRU cache simulator written from scratch, then a blocked matrix transpose tuned to drive misses to the floor.
-
05 · Processes 16/16 traces
Shell Lab¶
A job-control Unix shell, with signal masking around the
fork/addjobrace. -
06 · Allocation 97/100
Malloc Lab¶
malloc/free/reallocfrom the ground up, six designs deep — from one implicit list to twelve segregated rings. -
07 · Networking 70/70
Proxy Lab¶
An HTTP proxy that parses absolute URIs, rewrites hop-by-hop headers, and caches full responses under an approximate LRU policy.
-
08 · File Systems 22/22 · AI-assisted
SFS Lab¶
A small mmap-backed file system with atomic rename, open-file lifetime tracking, and per-file locking that scales past the global baseline.
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.