Primary Memory — RAM, ROM and Cache
Preview Part B: Hardware · Chapter 6 · 19 min read · 57 practice questions
After this chapter you will be able to
- explain the memory hierarchy and why it exists
- compare primary and secondary memory
- distinguish RAM types (SRAM, DRAM, SDRAM, DDR) and ROM types (PROM, EPROM, EEPROM, flash)
- explain cache memory, hits, misses and write policies
- explain virtual memory, paging and memory allocation methods
- convert between memory units confidently
Chapter 6 at a glance Recall: the memory ladder, primary vs secondary, RAM and ROM types, cache hits, and virtual memory.
6.1 What Is Memory?
Memory is the part of the computer that stores data and instructions.
- Memory is made of cells; each cell has a unique address.
- A memory cell is the smallest storage unit; it holds one bit (0 or 1).
- Memory capacity is measured in bytes (KB, MB, GB, TB…).
- Speed is measured by access time (usually nanoseconds).
- Memory is judged by its capacity, access time, access mode (random, sequential or direct) and permanence.
- Access time is the interval from a read or write request until the data is available or stored.
- Cycle time is the minimum gap between the starts of two successive memory operations. It is at least as large as the access time.
6.2 The Memory Hierarchy
Faster memory is costlier and smaller. So computers use a ladder of memories.
FigureMemory Hierarchy↑ Faster · costlier per bit · closer to CPU
- Registersinside the CPU
- CacheL1 · L2 · L3
- Main memoryRAM
- Secondary storageSSD / HDD
- Tertiary / offlineoptical disc, magnetic tape, cloud backup
↓ Larger capacity · cheaper per bit · slower
| Registers |
Fastest |
Bytes |
Yes |
| Cache |
Very fast |
KB – MB |
Yes |
| RAM |
Fast |
GB |
Yes |
| SSD / HDD |
Slower |
GB – TB |
No |
| Optical / tape |
Slowest |
TB (tape) |
No |
★ EXAM POINT — Order of speed (fastest first): Register > Cache > RAM > SSD > HDD > Optical disc > Magnetic tape. Order of capacity is the reverse.
What the full chapter covers
The full chapter has these sections:
- 6.1 What Is Memory?
- 6.2 The Memory Hierarchy
- 6.3 Primary vs Secondary Memory
- 6.4 RAM — Random Access Memory
- 6.5 ROM — Read Only Memory
- 6.6 Cache Memory
- 6.7 Virtual Memory
- 6.8 Memory Allocation Methods
- 6.9 Other Memory Terms
- 6.10 Units of Memory
- 6.11 More Memory Terms
- 6.12 Inventions and Milestones
- Chapter Quick Revision
- Most Important Terms
- Common Confusions
- Rapid Recall
Sample questions from this chapter
1. RAM acts as the processor's ___?
- Page file
- Waiting room
- Hard disk
- Registers
Show answer
Answer: B. Waiting room
RAM holds the data and programs the CPU is about to use, like a waiting room.
2. Minimum gap between two successive memory operations?
- Refresh period
- Cycle time
- Transfer rate
- Access time
Show answer
Answer: B. Cycle time
Cycle time is the minimum gap between the starts of two memory operations; it is never less than access time.
3. Typical cache size in older PCs?
- 256 KB to 4 MB
- 16 GB to 64 GB
- 1 GB to 4 GB
- 64 MB to 512 MB
Show answer
Answer: A. 256 KB to 4 MB
Older PCs had caches of about 256 KB to 4 MB; modern L3 caches are much larger.
4. Year PROM was invented?
- 1956
- 1946
- 1966
- 1971
Show answer
Answer: A. 1956
PROM was invented by Wen Tsing Chow in 1956; it is a ROM that can be programmed once.
5. Flash type used in memory cards and USB drives?
- NOR flash
- Mask ROM
- EPROM
- NAND flash
Show answer
Answer: D. NAND flash
NAND flash is dense and cheap per bit, so it is used in memory cards, USB drives and SSDs.