Mass Storage & Disk Scheduling

mass storage

Think of the difference between the papers spread on your desk right now and the filing cabinet against the wall. The desk is small and fast to reach, but everything on it gets cleared when you go home. The cabinet is large, slow to dig through, and keeps your files even while you are away for a year. A computer has the same split: RAM is the desk, and mass storage is the cabinet. Mass storage is the big, slow, cheap layer that remembers your data even when the power is off.

Concretely, mass storage (also called secondary storage) holds programs, files, and the operating system itself while the machine is off, and it holds far more than RAM can — terabytes versus gigabytes. The two common devices are the hard disk drive (HDD), which stores bits as magnetic patterns on spinning platters, and the solid-state drive (SSD), which stores bits in flash memory chips with no moving parts. The crucial property both share is that they are non-volatile: pull the plug and the data is still there. The crucial limitation is speed — even a fast SSD is far slower than RAM, and a disk is slower still. Because the CPU can only execute code and read operands from RAM, anything on mass storage must first be copied into main memory before a program can use it.

Why it matters: almost everything the OS does in the storage and file-system fields rests on this layer. Persistence (your files surviving a reboot) lives here; so does swap space, where the OS parks memory pages it cannot keep in RAM. Do not confuse mass storage with main memory: RAM is volatile working space the CPU runs from directly, while mass storage is the persistent backing store the CPU cannot run from. The whole storage hierarchy is built to bridge that gap.

When you save a document and shut down, the bytes do not stay in RAM (which loses everything without power) — they are written to mass storage, a 1 TB SSD or disk. Tomorrow you boot up, and the OS reads them back off storage into RAM so you can edit again.

Mass storage keeps data across power cycles; RAM does not.

Non-volatile does not mean indestructible or eternal — disks fail mechanically and flash cells wear out after a limited number of writes. Persistence is about surviving power loss, not about lasting forever.

Also called
secondary storage次級儲存輔助儲存