Arrange the following memory types in decreasing order of speed
AHard disk → RAM → Cache → Registers
BRAM → Cache → Registers → Hard disk
CRegisters → Cache → RAM → Hard disk
DCache → Registers → RAM → Hard disk
Answer:
C. Registers → Cache → RAM → Hard disk
Read Explanation:
Memory Hierarchy Overview
- Computer memory is organized in a hierarchy based on speed, cost, and capacity. The fundamental principle is that registers are the fastest and closest to the CPU, while secondary storage (like Hard Drives) is the slowest and has the largest capacity.
- The generally accepted decreasing order of speed (highest speed first) is: CPU Registers > Cache Memory > Primary Memory (RAM) > Secondary Memory (HDD/SSD).
Key Components
- CPU Registers: Located directly inside the processor, these are the fastest memory units. They hold immediate data and instructions that the CPU is currently processing.
- Cache Memory: A small, ultra-fast memory layer situated between the CPU and the main memory (RAM). It stores frequently accessed data to minimize the time taken to fetch information from the main RAM. It is categorized into levels: L1 (fastest/smallest), L2, and L3.
- Primary Memory (RAM): This is the main memory of a computer that the CPU accesses directly for active tasks. It is volatile, meaning data is lost when power is cut. It is significantly slower than cache but much faster than storage devices.
- Secondary Memory: Includes devices like Hard Disk Drives (HDD) and Solid State Drives (SSD). This is non-volatile storage used for long-term data preservation. Access speeds are measured in milliseconds (ms) compared to nanoseconds (ns) for RAM and registers.
Summary Table
| Memory Type | Speed | Location |
|---|---|---|
| Register | Extremely High | Inside CPU |
| Cache | Very High | Near CPU |
| RAM | High | Motherboard |
| Hard Drive | Low | Secondary Storage |
