Cache Performance and Replacement Policies: When the Cache Is Full
In the last course you learned what a cache is — a small fast memory that keeps hot data close, organised as direct-mapped, set-associative, or fully-associative slots. This lesso…
Memory Systems and I/O covers: Cache Performance and Replacement Policies, Virtual Memory, I/O Systems, Storage Devices and RAID. Year 2, Quarter 5. Includes 10 exercises and 2 projects.
This course unlocks once you've finished its prerequisite. Open prerequisite →
Complete prerequisites first to enroll.
In the last course you learned what a cache is — a small fast memory that keeps hot data close, organised as direct-mapped, set-associative, or fully-associative slots. This lesso…
Here is a thing you have relied on your entire career without being told it was a trick: every program on your machine believes it owns all of memory, starting at address zero, al…
Everything so far in this course happened inside the box — gates, the ALU, registers, caches, memory. But a computer that can't talk to the outside world is a very fast paperweigh…
At the bottom of the memory hierarchy is the tier that survives a power cut — storage. And storage is where computing stops being pure logic and runs headlong into physics. A spin…
- [ ] Calculate cache parameters — Given 32KB cache, 64B blocks, 4-way: compute sets, tag/index/offset bits - [ ] Draw the memory hierarchy with latency numbers — Registers (1ns) …
- [ ] Implement LRU cache eviction in C — Doubly-linked list + hash map, simulate cache behavior - [ ] Implement a page table walker in C — Two-level page table, translate virtual…
- [ ] Implement a TLB simulator in C — Associative lookup, LRU replacement, miss penalty calculation - [ ] Analyze Belady's anomaly — Find a reference string where FIFO with more …
- [ ] Build a cache simulator in C — Configurable direct-mapped/set-associative/fully-associative, LRU/FIFO eviction, read trace files, report hit rate and miss rate statistics
Implement a configurable cache simulator: direct-mapped, N-way set-associative, and fully-associative. Support LRU and FIFO eviction. Read memory access traces and report hit rate…
Write an assembler for the Hack assembly language (Nand2Tetris Project 6). Parse assembly mnemonics, resolve symbols, generate binary machine code. This bridges the hardware (Proj…
- [ ] Describe the memory hierarchy from registers to disk. What are typical latencies at each level? - [ ] What is a cache? Explain direct-mapped, set-associative, and fully-asso…
- [ ] Course 5.1 knowledge check passed - [ ] Course 5.2 knowledge check passed - [ ] Nand2Tetris Computer capstone completed (Projects 1-6)
12 lessons. Read in order; spiral back when you need to. By the end you'll have used the core ideas twice — once on the abstract, once on something you'll meet at work next week.