Hardware → Computer Hardware
RAM
Volatile main memory used by running programs and the operating system.
Motivation
RAM solves the problem of giving running programs fast temporary storage. A CPU cannot work efficiently if every operation must read from slow persistent storage.
Where it fits
RAM sits in the hardware track and is part of the memory hierarchy. Operating systems use RAM to hold processes, stacks, heaps, buffers, and caches.
Mental model
RAM is the workspace of a running computer. It is much faster than disk, but its contents disappear when power is lost.
Subconcepts
SRAM
Usually faster and more expensive; commonly used in CPU caches.
DRAM
Usually denser and cheaper; commonly used as main memory.
Common mistakes
- Confusing RAM with disk storage.
- Assuming more RAM always makes an application faster.
- Forgetting that RAM access is still much slower than CPU registers or caches.