optional · CSS study notes
I.10 Volatile vs Non-volatile Memory
⬆️ Back to: P-I.I. Introduction to Computing
🧭
Page Outline — click a heading to jump.
🎯
Exam pattern (2016–2026): 2016 Q3(b) "Explain and differentiate between volatile and non-volatile memory, giving examples" (6). This whole page is the answer.
1. Definitions
- Volatile memory: loses its contents when power is switched off.
- Used as fast, temporary working memory.
- Non-volatile memory: keeps its contents without power.
- Used for permanent storage of OS, programs and data.
- 🧠 Key exam line: volatile loses data when power is removed; non-volatile keeps it.
2. Why the Difference Exists (physical reason)
- DRAM: each bit is charge in a tiny capacitor that leaks.
- Must be refreshed thousands of times a second.
- Data gone moments after power loss.
- Flash (SSD, USB): charge trapped on an insulated floating gate; stays for years.
- HDD: magnetic polarity on a platter; stays without power.
3. Comparison Table
| Aspect | Volatile | Non-volatile |
|---|---|---|
| Power loss | Data lost | Data kept |
| Examples | RAM (DRAM, SRAM), cache, registers | ROM, HDD, SSD, flash drives, optical discs |
| Speed | Very fast | Slower (SSD fast, but slower than RAM) |
| Role | Working memory | Permanent storage, firmware |
| Cost per GB | Higher | Lower (especially HDD) |
| Location | In or near the CPU | Secondary storage devices |
4. Volatile Types
4.1 RAM
- CPU's main working memory; any location reached in about equal time.
- DRAM: needs refreshing; main memory.
- SRAM: faster, costlier; used for cache.
- Example: open browser tabs sit in RAM.
- Pro: very fast. Con: unsaved work lost on power cut.
4.2 Cache
- Tiny, fastest memory between CPU and RAM.
- L1: smallest, fastest, per core.
- L2: larger, slightly slower.
- L3: shared, largest.
- Example: a loop's instructions are read from L1, not RAM.
- Con: small and expensive per byte.
5. Non-volatile Types
5.1 ROM
- Holds BIOS/UEFI firmware needed before the OS loads.
- Variants: EPROM, EEPROM, flash ROM (reprogrammable).
- Pro: cannot be lost or changed by accident. Con: limited rewriting, slower than RAM.
5.2 HDD
- Magnetic spinning platters with a moving head.
- Pro: cheap, high capacity. Con: slower; shock-sensitive.
5.3 SSD
- NAND flash chips, no moving parts.
- Pro: fast, tough, silent. Con: costlier per GB; limited write cycles.
5.4 USB flash drives
- Same flash technology, portable.
- Pro: small, rewritable. Con: lower capacity, easy to lose.
6. Why a Computer Needs Both
- RAM: fast access for whatever the CPU is working on.
- Storage: keeps data and programs after shutdown.
- Memory hierarchy: registers → cache → RAM → SSD → HDD.
- The volatility line falls between RAM and SSD.
7. Everyday Effects
- Saving a file: copies it from volatile RAM to non-volatile storage.
- Crash or power cut: unsaved work is lost because it lived only in RAM.
- Autosave: writes the RAM copy to storage regularly.
- Booting: OS is copied from storage into RAM before it can run.
- Hibernation: writes all of RAM to disk so it can be restored.
8. ⚠️ MCQ Traps
- RAM = volatile, ROM = non-volatile. Often reversed.
- SSD is non-volatile even though it is fast. Speed and volatility are separate.
- Test: "is the data still there after power is cut?"
9. ✅ Self-Test Questions (with Answers)
Q1. Define volatile and non-volatile memory in one sentence each.
- Volatile: loses contents when power is off; temporary working memory.
- Non-volatile: keeps contents without power; permanent storage.
- Extra mark: give the physical reason (leaking capacitor vs trapped charge or magnetism).
Q2. Give two examples of each.
- Volatile: RAM, cache.
- Non-volatile: ROM, SSD (also HDD, USB drive).
Q3. Why does "saving" a file matter?
- Saving moves data from volatile RAM to non-volatile storage.
- Before saving, a power cut wipes the only copy.
- Explains autosave, boot time and hibernation.
Q4. Is an SSD volatile or non-volatile?
- Non-volatile: flash cells trap charge without power.
- Fast because it has no moving parts, not because it is volatile.
- Still roughly 100–1000 times slower than RAM.
10. 📜 Past-Paper Questions & MCQs (CSS 2016–2026)
2016 · Paper-I · Q3(b) · 6 marks
Q. Explain and differentiate between volatile and non-volatile memory, giving examples.
Quick revision and exam-ready model
Quick revision — key points
- Volatile loses contents without power; non-volatile retains them
- RAM/cache versus SSD/HDD/ROM
- Active processing versus persistent storage
- Give a document-loading example
Exam-ready answer — structured
Introduction / direct answer: Volatile memory loses its stored information when electrical power is removed; non-volatile memory retains it without continuous power.
Main explanation
- RAM and CPU cache are volatile, whereas ROM, flash memory, SSDs and hard drives are non-volatile. RAM provides rapid, temporary access to active programs and data; SSDs and HDDs store the operating system and files persistently.
- Volatile and non-volatile are categories of data retention, not synonyms for fast and slow or for primary and secondary storage. For example, on opening a document, the operating system loads its data from an SSD into RAM; after saving, the updated file remains on the SSD even when the machine is switched off.