NIMCET 2024 — Computer PYQ
NIMCET | Computer | 2024Cache memory functions as an intermediary between
Choose the correct answer:
- A.
CPU and Hard Disk
- B.
None of these
- C.
CPU and RAM
(Correct Answer) - D.
RAM and ROM
CPU and RAM
Explanation
The correct option is C) CPU and RAM.
Detailed Step-by-Step Explanation
To understand why cache memory sits between the CPU and RAM, let's explore the core concept of the memory hierarchy.
1. The Speed Mismatch Problem
The central processing unit (CPU) operates at extremely high speeds, executing billions of cycles per second (GHz scale). On the other hand, the main memory (RAM or Dynamic RAM) is significantly slower. Whenever the CPU needs to read or write data directly from the RAM, it has to wait for several clock cycles, causing a performance bottleneck known as a memory wall.
2. The Role of Cache Memory
To bridge this immense speed gap, a small, ultra-fast block of memory called Cache Memory (Static RAM or SRAM) is placed physically closer to or inside the CPU chip.
Its working mechanism is governed by the relation:
\text{Speed of CPU} > \text{Speed of Cache Memory} \gg \text{Speed of RAM (Main Memory)}
Data Intermediary: Cache stores frequently accessed data and instructions copies from the RAM.
The Cache Hit Scenario: When the CPU requests data, it first checks the cache. If the data is found (a cache hit), the CPU accesses it almost instantly, bypasses the slower RAM entirely, and avoids idle waiting states.
The Cache Miss Scenario: If the data is not in the cache (a cache miss), it is fetched from the RAM, loaded into the cache, and then handed over to the CPU for future reference.
Comparison of Memory Attributes
Attribute | CPU Registers | Cache Memory | Main Memory (RAM) | Secondary Storage (Hard Disk) |
Location | Inside CPU Core | Intermediary (L1/L2/L3) | Motherboard Slot | Data/SATA Interface |
Speed | Fastest | Fast | Moderate | Slow |
Storage Technology | Flip-Flops | SRAM (Static RAM) | DRAM (Dynamic RAM) | Magnetic/Flash Memory |
Storage Capacity | Bytes | Megabytes (MB) | Gigabytes (GB) |
