Skipping the older stuff
The point of talking about storage is that we’d like to understand how the OS gets from its representation of files and its handling of data in RAM to the permanent storage of data once the computer is turned off. There’s actually quite a lot to talk about here!
One thing to note is that storage in particular has changed a LOT over even the last 10-20 years… and it will continue to change even after you’ve left school! Despite these changes, we still use magnetic platter drives in a lot of our PCs, especially as a secondary storage device or long term storage (if you happen to buy some of the oldest generation iPods they actually have platter drives!), but this trend is changing. Because the landscape is changing and platter drives won’t make as much of an impact on your day-to-day lives, I don’t think it is much worth diving into. I’d much rather dive into SSDs initially, since they’ll be much more prevalent in your future.
SSD - Solid-State Storage Devices
Platter drives use a lot of different mechanical parts to enable long term data storage and retrieval. SSDs, on the other hand, are built with transistors, just like RAM and CPU components. SSDs are largely built with flash memory, or NAND-based flash, created by Fujio Masuoka in the 1980s (hence the term “Flash Drive”). Flash memory has some properties that we will want to pay attention to if we want to be able to leverage it effectively as a long-term storage device for writing to/reading from files.
How does Flash memory work?
Generally flash memory/chips are designed to store bits into a single transistor. There are:
SLC → single-level cell → charge in a transistor maps to a binary value (0 or 1) MLC → multi-level cell → charge in a transistor maps to multiple values (00, 01, 10, 11)
SLC chips are higher performance and more expensive; we’ll focus on those for now.