Lesson 5 of 7
Memory and Storage
Distinguish between volatile high-speed RAM and non-volatile long-term storage like SSDs and hard drives.
Learn it
Have you ever wondered where your open apps live compared to where your saved photos stay? Computers use two different systems: Memory (RAM) and Storage.
RAM (Random Access Memory) is like your working desk. It is super fast, but whatever is on it gets wiped clean when you switch the computer off. We call this 'volatile' memory.
Storage (like an SSD or Hard Drive) is like a filing cabinet. It is slower than RAM, but it keeps your files safe forever, even when the power is off. We call this 'non-volatile' storage.
Key terms
- RAM
- Random Access Memory; volatile primary memory that temporarily holds active programs and data currently in use.
- Volatile Memory
- Memory that loses all stored data when electrical power is switched off.
- Non-Volatile Storage
- Storage media that retains its data permanently, regardless of whether power is connected.
- Solid State Drive (SSD)
- A high-speed non-volatile storage device that uses flash memory chips with no moving mechanical parts.
- Virtual Memory
- A technique where secondary storage space is used by the operating system as an extension of RAM when physical memory is exhausted.
The Memory Speed Hierarchy
Explore the trade-offs between speed, capacity, and cost across the computer memory pyramid.
- 11. CPU Registers & Cache: Extremely small (kilobytes to megabytes), ultra-fast (sub-nanosecond latency), very expensive per byte.
- 22. Primary RAM: Fast (tens of nanoseconds), volatile, medium capacity (8 GB - 64 GB), holds active operating system and app state.
- 33. Solid State Drives (SSD): Fast non-volatile flash storage (microseconds), large capacity (512 GB - 4 TB), holds installed apps and saved files.
- 44. Optical & Cloud Archival: Massive capacity, slower access latency (milliseconds to seconds), used for long-term backups and cold storage.
Volatile vs Non-Volatile Persistence
python# Demonstrating memory volatility vs storage persistence
# 1. Volatile Variable (Lives only in RAM while script executes)
active_game_score = 4500
print('Score in RAM:', active_game_score)
# 2. Non-Volatile Persistence (Written to secondary storage)
with open('save_data.txt', 'w') as disk_file:
disk_file.write(str(active_game_score))
print('Score safely committed to secondary storage!')
# Even if power cuts now, save_data.txt survives on disk.Variables in Python live temporarily in volatile RAM. To survive power loss or program termination, data must be committed to secondary storage like a text file.
Try it
Identify which memory statements describe REAL computer science facts versus FAKE misconceptions.
RAM loses its contents as soon as you completely power down the computer.
Adding more RAM will permanently increase how many video files your hard drive can store.
Solid State Drives (SSDs) are faster and more shock-resistant than Hard Disk Drives (HDDs) because they have no moving parts.
Virtual memory is a hardware chip installed directly next to the CPU to double clock speed.
Challenge
Explain what happens to system performance when a computer runs out of physical RAM and begins thrashing with virtual memory on a slow hard drive.
Pick whichever way suits you — every mode earns the same bonus XP.
Write at least 40 more characters to submit.
Mark your own work
Guided walkthrough — 0/5 clues revealed
- Clue 1 locked — reveal it only if you get stuck.
- Clue 2 locked — reveal it only if you get stuck.
- Clue 3 locked — reveal it only if you get stuck.
- Clue 4 locked — reveal it only if you get stuck.
- Clue 5 locked — reveal it only if you get stuck.
Each clue costs 4 XP (never below 19 XP). You'd earn 38 XP right now.
Extension: Compare the microscopic mechanism of dynamic RAM (capacitors needing constant refresh) with static RAM (flip-flop circuits used in CPU cache).