1. Introduction
Every computer must store two things: the data it works on and the instructions (program) that tell it what to do. But no single storage device is fast, big and cheap all at once. A device fast enough to keep up with the CPU is tiny and expensive; a device big and cheap enough to hold all your files is painfully slow. The engineering answer to this dilemma is the memory hierarchy: a layered arrangement of several memory types, each trading speed for size and cost, so the machine behaves as if it had one huge, fast, cheap memory.
This topic is a permanent favourite in BCS, Bank and IT-officer written and MCQ exams. Questions test whether you can (a) order the levels correctly, (b) tell RAM from ROM and SRAM from DRAM, (c) classify memory as volatile/non-volatile and primary/secondary, (d) recall capacity units and access times, and (e) do small numeric calculations (cache hit ratio, effective access time, address-space size). Master the logic here and these become guaranteed marks.
2. Learning Objectives
After studying this lesson you will be able to:
- Explain why a memory hierarchy exists and the speed–cost–capacity trade-off behind it.
- Draw and order the hierarchy from registers → cache → main memory → secondary → tertiary/offline.
- Distinguish primary vs secondary, volatile vs non-volatile, and sequential vs random access.
- Define and contrast RAM (SRAM, DRAM) and ROM (PROM, EPROM, EEPROM, Flash).
- Explain registers, cache levels (L1/L2/L3), locality of reference, hit/miss ratio.
- Compute effective/average memory-access time, hit ratio, and address-space and memory size.
- Avoid the classic exam traps that trip up most candidates.