Unit content
Memory and storage
Computers use several kinds of storage because no single technology is simultaneously fastest, largest, cheapest and persistent.
Main memory
RAM holds data and instructions that running programs can access quickly. It is normally volatile: its contents disappear when power is removed.
Memory is addressed, so the processor can refer to particular locations in a large sequence of bytes.
Persistent storage
Devices such as solid-state drives and hard disks retain data without power. They provide much larger capacity than main memory but are accessed through different hardware and operating-system interfaces.
Storage hierarchy
A simplified hierarchy is
registers → caches → RAM → persistent storage
fastest largest
smallest slower
Frequently used data is kept closer to the processor when possible.
Capacity and access are different concepts
A file stored on disk is not automatically loaded entirely into RAM, and a value in RAM is not automatically persistent.
Programs and operating systems move data between levels of the hierarchy according to need.
Understanding this distinction is essential for later concepts such as files, processes, virtual memory and performance.