Types and Characteristics of Computer Memory
Computer memory is the physical storage that lets a computer hold instructions and data for processing. It is classified by speed, capacity, volatility, and its proximity to the central processing unit.
From temporary working memory to permanent firmware storage, each type serves a distinct role in system performance. For Prelims, the key is to distinguish memory types by whether they retain data without power, how fast they operate, and where they are used.
Primary Memory
Primary memory is directly used by the processor during active computation. It includes volatile memory such as RAM and non-volatile memory such as ROM.
- Random Access Memory (RAM): Main working memory used to store active data and instructions.
- Direct access: The processor can read or write any memory location in equal time.
- Volatile nature: Data is lost when power is switched off.
- Role: Supports running programs and temporary storage during execution.
Static RAM and Dynamic RAM
- Static RAM (SRAM): Uses flip-flops to store each bit.
- Speed: Very fast and does not need constant refreshing.
- Use: Commonly used in processor cache.
- Dynamic RAM (DRAM): Stores bits in microscopic capacitor-transistor pairs.
- Refresh requirement: Needs periodic electrical refresh to prevent data loss.
- Density: Slower than SRAM but denser and cheaper for larger memory modules.
- Use: Standard form of main memory in computers.
Read-Only Memory
Read-Only Memory (ROM) is non-volatile memory used for essential boot instructions and firmware required to start hardware.
- ROM: Data is permanently written during manufacturing and cannot be altered by normal user operations.
- PROM: Programmable Read-Only Memory can be written once using special programming hardware.
- EPROM: Erasable Programmable Read-Only Memory can be erased and rewritten using ultraviolet light.
- EEPROM: Electrically Erasable Programmable Read-Only Memory allows targeted byte-level erasure and reprogramming using electrical voltages.
- Function: Commonly used for firmware and basic system initialization.
Cache Memory and Registers
Cache memory is an ultra-fast semiconductor memory placed directly on or near the microprocessor core to reduce data access delay. It stores frequently used instructions and data to avoid repeated access to slower main memory.
- Level 1 cache: Integrated directly into the processor die; smallest in capacity and fastest in speed.
- Level 2 cache: Larger than L1 and placed close to the core.
- Level 3 cache: Larger shared cache accessible across multiple processor cores.
- Cache hit: Occurs when requested data is found in cache.
- Cache miss: Forces the system to fetch data from slower main memory.
- Registers: The fastest storage locations in a computer, holding single data words for immediate execution.
Exam point: Registers are faster than cache, and cache is faster than RAM.
Characteristics and Comparison
- Volatile memory: RAM and cache lose data when power is off.
- Non-volatile memory: ROM and flash memory retain data without power.
- Access speed: Registers are fastest, followed by cache, SRAM, DRAM, and ROM.
- Capacity: Registers are smallest; DRAM generally offers much larger capacity than SRAM.
- Purpose: RAM supports active processing, ROM stores boot and firmware data, and cache speeds up repeated access.
| Memory Type | Volatility | Access Speed | Typical Capacity | Main Use |
| Cache Memory | Volatile | Extremely fast | Kilobytes to Megabytes | Frequently used processor instructions |
| Static RAM | Volatile | Very fast | Megabytes | High-speed cache memory |
| Dynamic RAM | Volatile | Fast | Gigabytes | Main system memory for active applications |
| Read-Only Memory | Non-volatile | Moderate | Megabytes | BIOS and firmware storage |
Other Memory Forms
- Flash memory: A specialized form of EEPROM that retains data without power and uses block-level erasure.
- Magnetic core memory: An early form of random-access memory that used tiny magnetic rings to store bits.
- Non-volatile memory express protocol (NVMe): An interface standard for accessing high-speed storage media through PCI Express lanes.
Key Prelims Takeaways
- RAM is volatile: Its contents are lost when power is disconnected.
- SRAM vs DRAM: SRAM is faster and used in cache; DRAM is denser and used as main memory.
- ROM is non-volatile: It stores boot instructions and firmware.
- PROM, EPROM, EEPROM: These are programmable forms of ROM with different erase/write methods.
- Cache memory: Reduces latency by storing frequently used data near the processor.
- Registers: These are the fastest storage units in a computer.
- Flash memory and NVMe: Flash is a form of EEPROM; NVMe is an interface standard for high-speed storage.