Topic 3 Part 5: Data Storage
Understanding Computer Memory: RAM and CPU Cache
Types of Memory in Computers
- A computer utilizes two main types of memory: Dynamic RAM (DRAM) and Static RAM (SRAM).
- DRAM uses capacitors to store data, requiring constant refreshing with electricity to maintain information.
- SRAM, used in CPU cache, does not need constant refreshing, making it faster but more expensive than DRAM.
The Role of CPU Cache
- The CPU cache stores copies of frequently accessed data and instructions from RAM for quick access by the CPU.
- Without a cache, the computer would operate slower as the CPU often waits for data from RAM, creating a bottleneck.
- The cache acts as an intermediary between the CPU and RAM to enhance performance by reducing wait times.
Levels of Cache Memory
- There are three levels of cache: Level 1 (L1), Level 2 (L2), and Level 3 (L3).
- L1 is located on the processor itself and is the fastest type of cache.
- L2 serves as external cache for recent data not found in L1.
- L3 caches additional recent accesses that were missed by L2 before reverting to slower RAM if necessary.
Characteristics of Cache Levels
- In earlier computers, L2 was on a separate chip; modern CPUs integrate it within the processor.
- L1 is smaller but faster than L2; conversely, L3 is larger than both but slower than L2.