Module 05 · How Computers Work · Talking to the kernel · about 16 min to read
Spinning rust and flash: HDD and SSD internals
The Memory Hierarchy · Open board
The layers of storage, each bigger and slower than the one above. This lesson opens the bottom layer: the spinning disk and the flash drive.
Before you start. A file system turns files into numbered blocks and sends those numbers down to a disk (The filing cabinet: how a file system is built). A save lands in the page cache in RAM first, and fsync forces it onto the disk (The drawer that says it saved). Storage is far slower than RAM, and every layer above it hides that gap (The Memory Hierarchy (cache, locality, the memory wall)). The disk sits across a bus (I/O, Interrupts & the Bus).
Lesson 27 of 41 in How Computers Work
The rest of this lesson is part of a plan.
A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.
See plansAlready a member? Sign in
Or start free: a free account opens lessons 2 and 3 of every track.
In this lesson
- The problem: the same bytes, very different speeds
- The hard disk: a platter, a head, and the seek
- The flash drive: no moving part, but a strange rule
- The FTL: the translator that hides the rule
- Write amplification: the host writes once, the chips write more
- TRIM: telling the drive what is really free
- The hard disk, as a script
- The cost of collecting one block
- The toy FTL
- Other costs and how real drives cope
Terms it explains: seek, page, block, flash translation layer, FTL, write amplification, TRIM, Common mistakes, Garbage collection, cache, cache line, DRAM, hit rate, hit/miss, latency vs bandwidth, LRU/associativity, memory wall, MMU/page table, NUMA, prefetch, spatial locality, SRAM, swap/paging, temporal locality, TLB, virtual memory, working set.
Review How Computers Work
Saved in this browser, and to your account when you sign in.