RAM, ROM and non-volatile storage
In short: RAM is volatile main memory: fast, but empty after switch-off. ROM is read-only memory that holds data permanently and is only read. Non-volatile storage media (SSD, hard drive, USB stick) keep data without power and serve for storage.
In more detail: “Volatile” means: the contents are lost without power. Computers need both: fast, volatile memory for running work and non-volatile memory for keeping programs, data and the startup software.
In Depth
| RAM | ROM | Non-volatile storage media | |
|---|---|---|---|
| Name | Random access memory | Read-only memory | SSD, HDD, USB stick, SD card |
| Volatile? | yes | no | no |
| Writing | fast, any number of times | fixed or rarely | possible, limited number (flash) |
| Speed | very high (~50 GB/s) | slow | SSD 0.5 – 14 GB/s, HDD 0.15 GB/s |
| Size | 8 – 128 GB | KB to MB | 256 GB – several TB |
| Purpose | Programs and data currently being worked on | Startup software (firmware) | Operating system, programs, files |
| Price per GB | high | – | low |
RAM (mostly DRAM): Each cell is a tiny capacitor that must be refreshed constantly. Direct access to every address in equal time. SRAM (cache) is faster and more expensive.
ROM and relatives:
- Mask-programmed ROM: Content burned in during manufacturing.
- PROM, EPROM (UV-erasable), EEPROM (electrically erasable).
- Flash ROM: Common today for BIOS/UEFI firmware, writable (update).
Non-volatile (also mass storage): Data remains without power. Examples: Magnetic hard drive, flash (SSD), optical media (CD, DVD), magnetic tape.
Example of a file: It lies on the SSD, is copied into RAM when opened, edited there, and written back on saving. If you cut the power before saving, changes in RAM are lost.
- Note: The name “random access” is confusing since SSDs also have random access. The difference lies in speed and volatility.
- New technologies: NVRAM, 3D XPoint (discontinued), MRAM combine RAM speed with non-volatility.
See also: RAM, ROM, NAND flash