Cache Memory Principles and Design

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/26

flashcard set

Earn XP

Description and Tags

Comprehensive vocabulary flashcards covering computer memory hierarchy, cache levels, mapping techniques, replacement policies, coherence protocols, and design elements.

27 Terms

1
New cards

Cache Memory

A small, fast type of volatile computer memory that provides high-speed data access to the processor and stores frequently used data and instructions to reduce retrieval time from slower main memory (RAM).

2
New cards

Temporal Locality

The principle stating that recently accessed data is likely to be accessed again in the near future.

3
New cards

Spatial Locality

The principle stating that data stored near recently accessed memory addresses are likely to be used soon.

4
New cards

L1 Cache (Level 1)

The fastest and smallest cache memory located directly on the processor chip (typically 16 KB16\,\text{KB} to 128 KB128\,\text{KB}) that stores critical data and instructions currently needed by the processor.

5
New cards

L2 Cache (Level 2)

An intermediate cache storage between L1 cache and main memory (typically 128 KB128\,\text{KB} to several MB\text{MB}) that acts as a backup to store frequently used, less critical data.

6
New cards

L3 Cache (Level 3)

A last-level cache located on the processor chip and shared among multiple cores in multi-core processors (typically several MB\text{MB} to tens of MB\text{MB}) to reduce accesses to RAM.

7
New cards

L4 Cache

A large cache (often tens of MB\text{MB}) located outside the processor or on a separate chip, found in high-performance computing, server-grade processors, and certain APUs.

8
New cards

Cache Hit

The event where data requested by the CPU is found in the cache and retrieved immediately.

9
New cards

Cache Miss

The event where data requested by the CPU is not found in the cache and must be fetched from lower cache levels or main memory.

10
New cards

Direct Mapping

A cache mapping technique where each main memory block can only be placed into one specific cache line, indexed using Tag, Index, and Offset fields.

11
New cards

Fully Associative Mapping

A cache mapping technique where any memory block can be stored in any cache location, requiring the cache controller to search the entire cache using the Tag field.

12
New cards

Set Associative Mapping

A hybrid mapping technique where the cache is divided into sets (such as 2-way, 4-way, or 8-way), and each memory block maps to a specific set but can occupy any line within that set.

13
New cards

Least Recently Used (LRU)

A replacement policy that evicts the least recently accessed data block first, making it well-suited for workloads exhibiting temporal locality.

14
New cards

First-In, First-Out (FIFO)

A replacement policy that treats the cache like a queue and evicts the earliest stored block when space is needed, regardless of recent usage.

15
New cards

Least Frequently Used (LFU)

A replacement policy that maintains a counter for each block and evicts the one that has been accessed the lowest number of times.

16
New cards

Random Replacement

A replacement policy that evicts a randomly chosen cache block without tracking usage history or frequency.

17
New cards

Adaptive Policies

Dynamic cache replacement strategies that use machine learning or heuristics to switch between policies like LRU, LFU, or FIFO based on workload patterns.

18
New cards

Cache Coherence

A mechanism that ensures changes to data in one processor's cache are consistently reflected across all other caches in a multi-core or multiprocessor system.

19
New cards

MESI Protocol

A cache coherence protocol that tracks data states across multiple caches using four states: Modified, Exclusive, Shared, and Invalid.

20
New cards

Cache Line (Block) Size

The basic unit of data transfer between cache and main memory, typically ranging from 32 bytes32\,\text{bytes} to 128 bytes128\,\text{bytes}.

21
New cards

Write-through

A cache write policy where modifications to data are written simultaneously to both the cache and main memory.

22
New cards

Write-back

A cache write policy where modifications are written only to the cache and the main memory is updated later when the cache line is evicted.

23
New cards

Miss Penalty

The time penalty incurred when a cache miss occurs and data must be retrieved from the slower main memory.

24
New cards

Compulsory Misses

Cache misses that occur on the very first access to a memory block.

25
New cards

Capacity Misses

Cache misses that occur when the cache is not large enough to hold all the blocks needed during execution.

26
New cards

Conflict Misses

Cache misses caused when multiple memory blocks map to the exact same cache slots, common in direct-mapped and low-associativity caches.

27
New cards

Cache Controller

The hardware component responsible for managing the cache, including data fetching, miss handling, and coherence management.