Solid-state drives (SSDs) solid-state drive An SSD: persistent storage built from transistors (flash), with no moving parts β unlike a hard disk. It presents the standard block read/write interface but internally uses a flash translation layer to hide flash's quirks (erase-before-write, wear-out). Much faster than disks at random I/O, but pricier per GB. defined in ch. 44 β open in glossary store data persistently with no moving parts β just transistors, like memory and CPUs. The technology is NAND flash flash memory NAND-based flash: solid-state storage that traps charge in transistors to store bits and retains it without power. Its defining quirks: you can read/program at page granularity but must ERASE a whole (larger) block before re-programming any page in it, and blocks wear out after many program/erase cycles. defined in ch. 44 β open in glossary , and it has two quirks that make building an SSD a real challenge: to rewrite a small chunk you must first erase a bigger chunk (expensive), and writing a spot too many times wears it out.
The Crux: How To Build A Flash-based SSD
How do we build a fast SSD from raw flash, given the expensive nature of erasing and the fact that repeated overwrites wear the device out?44.1 Storing a Single Bit
A flash cell stores bits by trapping charge at distinguishable levels β a multi-level cell multi-level cell How many bits a flash transistor stores by distinguishing charge levels: SLC (single-level, 1 bit β fastest, longest-lived, priciest), MLC (2 bits), TLC (3 bits β densest/cheapest, slower, shorter-lived). More bits per cell = more capacity per dollar but worse performance and endurance. defined in ch. 44 β open in glossary design trades density against speed and endurance:
| bits/cell | charge levels | trade-off | |
|---|---|---|---|
| SLC | SLC β 1 bit (0 or 1) | 2 levels | fastest, longest-lived β but priciest per GB |
| MLC | MLC β 2 bits (00/01/10/11) | 4 levels | middle ground |
| TLC | TLC β 3 bits | 8 levels | densest & cheapest β but slower and shorter-lived |
44.2 Blocks and Pages
Flash cells are grouped into banks, and a bank is accessed at two granularities:
- A flash block flash block The unit of flash ERASE (an 'erase block'), typically 128 KBβ2 MB β much larger than a flash page, and different from a disk/FS block. Erasing sets every bit to 1 and destroys all pages in the block, so any data you still need must be copied out first. This erase-before-program constraint shapes all of SSD design. defined in ch. 44 β open in glossary (or erase block, 128 KBβ2 MB) β the unit of erase.
- A flash page flash page The unit of flash reads and programs (writes), a few KB (e.g. 4 KB) β distinct from a VM page or a disk block. Pages live within a flash block. A page can be programmed only once after its block is erased; changing it again requires erasing the whole block. defined in ch. 44 β open in glossary (a few KB) β the unit of read and program. Each block holds many pages.
Tip: Be Careful With Terminology
These βblockβ and βpageβ mean different things than the disk/FS block and the virtual-memory page weβve used all along. Thereβs no central authority for naming β your job is to know the right terms for each domain.Hereβs a bank as three blocks of four pages each:
44.3 The Basic Operations
Flash supports three low-level operations:
- Read a page: fast (~10s of Β΅s), uniform regardless of location β flash is a random-access device (unlike a seeking disk).
- Erase a block: ~milliseconds, and it resets every bit in the block to 1, destroying all its pagesβ contents. Required before any re-programming.
- Program a page: ~100s of Β΅s, flips selected 1s to 0s to write the pageβs data. Only works on an erased page.
So each page moves through states β INVALID β (erase) β ERASED β (program) β VALID β and once VALID, the only way to change it is to erase its whole block:
1Start: all pages invalid
Initially the pages are in the INVALID state β no usable data, and not yet programmable.
Why writes are expensive
That erase-before-program rule is the whole story of SSD design. Overwriting a single page forces erasing its entire block β which wipes every other page in that block too:
1Four valid pages with data
A 4-page block, each page holding 8 bits of real data (all VALID).
Reading is easy and fast (great random-read performance, far beyond a disk). Writing is the hard part β erase the block (after saving any data you need), then program β and repeating this program/erase cycle is what eventually wears the flash out. The rest of the chapter is about taming these costs.
Check yourself: flash basics and operations
1.What is a solid-state drive (SSD)?
2.How do SLC, MLC, and TLC flash differ?
3.How do a flash PAGE and a flash BLOCK differ?
4.What are the three flash operations and their rough costs?
5.What is flash's defining constraint on writing?
6.Why is overwriting a single page (say page 0) so expensive?