Which one of the following memories is extremely fast and acts as a high-speed buffer between the CPU and the main memory ?
- (a)RAM
- (b)ROM
- (c)Flash Memory
- (d)Cache Memory
Answer
Why
Correct — D, (d) Cache Memory. Cache is a small, very fast memory that sits between the processor and main memory and holds copies of the data and instructions the processor is most likely to want next. The processor can execute instructions far faster than main memory can deliver them, so without a buffer it would spend most of its time waiting. Cache closes that gap: when the processor asks for something, the cache is checked first, and if the item is there — a cache hit — it is supplied at close to processor speed; only on a miss does the request go out to main memory, which then also brings back the neighbouring data on the assumption that it will be wanted shortly. The assumption is called locality of reference, and it holds well enough in practice that a small cache serves the great majority of requests. Cache is built from static RAM, which holds its bit in a latch and needs no refreshing, which is what makes it faster and also more expensive and bulkier per bit than the dynamic RAM used for main memory. Modern processors use several levels — L1 closest to the core and smallest, then L2, then a larger shared L3 — each bigger and slower than the one before.
Why the others are wrong
- (a)RAM — RAM is the main memory itself — the thing cache is a buffer IN FRONT OF, not the buffer. It is the read-write working memory that holds the programs and data currently in use, and it is volatile, losing everything when power is cut. It is much faster than disk and much slower than cache, which is precisely why a faster layer had to be inserted between it and the processor. An option cannot be both ends of the same relationship, and the stem's words 'between the CPU and the main memory' rule this one out on their own.
- (b)ROM — ROM is read-only memory: non-volatile, retaining its contents without power, and holding firmware such as the start-up routines that run before an operating system loads. Its defining features are permanence and the fact that it is normally not written to during ordinary operation — the opposite of a buffer, which has to be rewritten constantly as the working set changes. It is also not notably fast. Nothing about it fits the description in the stem.
- (c)Flash Memory — Flash memory is non-volatile secondary storage — the technology inside solid-state drives, USB drives and memory cards. It is far faster than a spinning magnetic disk, which is why it has largely replaced one, but it is orders of magnitude slower than cache or even main memory, and it sits below main memory in the memory hierarchy rather than above it. Its job is to keep data when the machine is switched off, not to feed the processor at speed.
Concept
Computer memory is organised as a hierarchy, and every level of it is a compromise between speed, capacity and cost per bit. At the top are the processor's own registers, a handful of locations operated on directly and at full processor speed. Below them is cache, in levels: L1 is the smallest and fastest and sits inside the core; L2 is larger and a little slower; L3 is larger still and usually shared between cores. Below cache is main memory, the RAM, measured in gigabytes and built from dynamic RAM cells that store each bit as a charge on a capacitor and must be refreshed thousands of times a second. Below that is secondary storage — solid-state drives built from flash, and magnetic hard disks — which is non-volatile, vastly larger and vastly slower. As you go down the hierarchy capacity rises and cost per bit falls, while speed falls with it. The hierarchy works because programs do not touch memory at random: they reuse the same instructions and data within a short window (temporal locality) and tend to want addresses near the ones just used (spatial locality). That is what lets a cache of a few megabytes make a system of many gigabytes feel fast. The other distinction worth holding is volatility: registers, cache and RAM lose their contents when power goes, while ROM and flash keep them.
Memory questions are a fixture of the EO/AO computer block and they are asked at the level of definitions, not engineering. What is being tested is whether a candidate can place each named memory in the hierarchy and state its two or three defining properties: volatile or not, read-only or read-write, primary or secondary, fast or slow. Almost every question in this family can be answered by reading the stem for the position it describes — 'between the CPU and the main memory', 'retains data when power is off', 'holds the boot instructions' — and matching it to a level. Keeping the ladder in order, from registers down to disk, answers this question and most of its relatives.
Key facts
- Memory hierarchy from fastest to slowest: registers, cache (L1, L2, L3), main memory (RAM), secondary storage (SSD/flash, hard disk).
- Cache sits between the CPU and main memory and holds copies of frequently or recently used data and instructions.
- A request found in cache is a hit; one that is not is a miss and must be fetched from main memory.
- Cache works because of locality of reference — programs reuse recent items and items near them.
- Cache is built from static RAM (SRAM), which needs no refresh; main memory uses dynamic RAM (DRAM), which does.
- RAM is volatile read-write main memory; ROM is non-volatile and normally read-only, holding firmware.
- Flash is non-volatile secondary storage — SSDs, USB drives, memory cards — much slower than RAM.
- Going down the hierarchy, capacity increases and cost per bit falls, while access speed decreases.
Study next
Common traps
- Picking RAM because the stem contains the words 'main memory'. The stem places the answer BETWEEN the CPU and main memory.
- Treating cache as a kind of secondary storage. It is the fastest memory in the machine after the registers, not a storage device.
- Confusing flash memory's non-volatility with speed — it keeps data without power, but it is far slower than RAM.
- Assuming ROM is fast because it is inside the machine. Speed and volatility are independent properties.
- Forgetting the registers when asked for the fastest storage in a computer — the answer to that question is not cache.
The EO/AO computer block asks one or two memory items per paper, usually by describing a position in the hierarchy or a defining property and asking which memory it is, occasionally in reverse. The options are bare acronyms and short names, so the whole question is definitional. Neighbouring items in the same block test conversions and storage units, which lean on the same powers of two.
Related PYQs
EPFO_EOAO_2020_Q27Open & attempt →Which one of the following basic operations for converting raw input data into useful information is not performed by all computers ?
- (a) Inputting
- (b) Storing
- (c) Switching
- (d) Outputting
Answer(c) Switching
The preceding item in the same block names storage as one of the basic operations every computer performs; this question asks which layer of that storage feeds the processor.
EPFO_EOAO_2020_Q30Open & attempt →Which one of the following represents 1 GB of information ?
- (a) 1024 KB
- (b) 1024 MB
- (c) 1024 TB
- (d) 1024 PB
Answer(b) 1024 MB
The storage-unit item two questions later — the same hierarchy measured in capacity rather than in speed.
Practice
- practice — not a real PYQ
Cache memory is normally built using which one of the following ?
- (a)Dynamic RAM
- (b)Static RAM
- (c)EEPROM
- (d)Magnetic core
Answer(b) Static RAM
- practice — not a real PYQ
Which one of the following memories retains its contents when the power supply is switched off ?
- (a)Cache memory
- (b)Static RAM
- (c)ROM
- (d)Dynamic RAM
Answer(c) ROM