Skip to main content

2.1 Memory Hierarchy Pyramid & Principles of Locality

📚02Topic 2.1⏱️12 min
🎯High-Yield For:Every CPU execution cycle, database buffer manager, OS page replacer, and high-performance loop algorithm depends on memory hierarchy and locality of reference.

💡 Core Intuition: The Fundamental Memory Paradox​

Every computer architect and software engineer demands three properties from memory:

  1. Massive Capacity: The ability to hold petabytes of video, game assets, database indexes, and machine learning models.
  2. Minimal Cost per Bit: A price-to-storage ratio economical enough to deploy at commercial scale.
  3. Near-Instant Access Time: Latencies in the sub-nanosecond range so modern gigahertz CPUs never starve for instructions or data.

Physics and semiconductor economics dictate that no single memory technology can satisfy all three requirements simultaneously:

📐Semiconductor Physics Reality: The Cost vs Speed Frontierprinciple
  • Static RAM (SRAM): Ultra-fast (∼0.5−2 ns\sim 0.5 - 2\text{ ns}), large cell (6 to 8 transistors6\text{ to }8\text{ transistors}), highest cost per bit, low density   ⟹  \implies Ideal for on-chip Cache, economically impossible for RAM.
  • Dynamic RAM (DRAM): Ultra-dense (1 transistor +1 capacitor1\text{ transistor } + 1\text{ capacitor}), economical cost per bit, moderate speed (∼50−100 ns\sim 50 - 100\text{ ns}), requires periodic refresh   ⟹  \implies Ideal for Main Memory.
  • Non-Volatile Storage (Flash / Magnetic): Massive capacity, lowest cost per bit, orders of magnitude slower (microseconds to milliseconds)   ⟹  \implies Ideal for Persistent Secondary Storage.

🍳 The Everyday Analogy: Showroom, Godown & Factory​

Consider how a premier furniture manufacturer operates:

  • The Boutique Showroom (Cache Memory): Located right in the city center where customers browse. It has very limited floor space (small capacity) and astronomical rent per square foot (high cost per unit), but when a customer wants to see the season's top-selling chair, it is instantly available (zero access latency).
  • The Regional Godown (Main Memory / RAM): Located in the city outskirts. Rent is modest, capacity is large enough to stock hundreds of items, but sending a delivery truck to restock the showroom takes 45 minutes (moderate latency).
  • The Heavy Manufacturing Factory & Lumber Mill (Secondary Storage / Disk): Located hundreds of kilometers away in an industrial zone. It stores raw timber and limitless inventory at rock-bottom cost per acre, but dispatching an order takes three days.

If a retail store had to dispatch a truck to the distant lumber mill for every customer query, the business would collapse. But because 95%95\% of customer requests target the display items currently sitting in the showroom, the business operates at lightning speed!

💻 Bridging to Computer Science​

Modern CPU execution engines run at clock frequencies of 3.0 GHz3.0\text{ GHz} to 5.5 GHz5.5\text{ GHz}, completing clock cycles in 0.20.2 to 0.3 nanoseconds0.3\text{ nanoseconds}. However, fetching a 64-bit integer directly from standard Dynamic RAM (DRAM) requires 5050 to 100 nanoseconds100\text{ nanoseconds} (equivalent to 200–300 idle CPU clock cycles!).

If the processor waited on raw main memory for every instruction fetch and operand load, the CPU would spend over 99%99\% of its operational lifespan completely stalled—a catastrophic state known as the Memory Wall.

The architectural solution is the Memory Hierarchy Pyramid, organized such that faster, smaller, and more expensive memories sit closest to the processor datapath, creating the illusion of a memory system that is simultaneously as fast as the fastest SRAM cache and as vast as the largest secondary disk.


⚡ The Memory Hierarchy Pyramid Architecture​

The memory hierarchy system encompasses all storage devices employed within a computing system, tiered from high-speed processing logic down to magnetic and optical tape archives:

The Modern Computing Memory Hierarchy

Hierarchical organization balancing capacity, access latency, cost per bit, and access frequency

Level 0: CPU Registers

Processor General-Purpose & Control Registers

⚡

Directly wired into the ALU execution datapath; single-cycle access latency.

Access Time: ~0.25 - 0.5 nsCapacity: 1 - 2 KB (e.g., 32 x 64-bit)Technology: Flip-Flop Register ArrayCost: Astronomical per bit
↓
Level 1-3: Hardware Cache

Multi-Level On-Chip SRAM Caches (L1, L2, L3)

🚀

Static RAM buffers bridging CPU execution speed and off-chip bus latency.

L1: ~1 ns (32-64 KB per core)L2: ~3-5 ns (512 KB - 1 MB per core)L3: ~10-20 ns (16 - 96 MB shared)Technology: 6T / 8T CMOS SRAM
↓
Level 4: Main Memory

Primary Physical Memory (RAM / DRAM)

🧠

Directly addressable by the CPU; holds active OS kernel structures and running process code.

Access Time: ~50 - 100 nsCapacity: 8 GB - 256 GBTechnology: Synchronous DRAM (DDR4/DDR5)Cost: Moderate ($/GB)
↓
Level 5: Secondary Storage

Solid-State Drives (SSD) & Magnetic Hard Disks (HDD)

💾

Non-volatile block storage preserving persistent files, binaries, and virtual memory swap space.

Access Time: ~10-100 µs (NVMe SSD) to ~5-10 ms (HDD)Capacity: 512 GB - 16 TBTechnology: 3D TLC/QLC NAND Flash, Magnetic Platters
↓
Level 6: Auxiliary Storage

Tertiary, Optical & Cloud Archive Storage

🌐

Cold backup, long-term archival records, and distributed network object stores.

Access Time: Seconds to Minutes / HoursCapacity: Petabytes to ExabytesTechnology: LTO Tape, AWS Glacier, Blu-Ray BDXL

Inboard vs Outboard Memory​

In computer architecture examinations and GATE specifications, memory is broadly segregated into two architectural zones:

The 4 Cardinal Invariants of the Hierarchy​

As an engineer moves downwards from CPU Registers toward Secondary Storage:

  1. Access Time (TaccessT_{\text{access}}) Increases: Access latency grows by over six orders of magnitude (from 0.5 ns0.5\text{ ns} in registers to 10 ms10\text{ ms} in mechanical disks).
  2. Storage Capacity (SS) Increases: Capacity expands from kilobytes in registers to terabytes and petabytes on disk.
  3. Cost per Bit (Cost/Bit\text{Cost} / \text{Bit}) Decreases: Economic cost per bit drops exponentially, making high capacity affordable.
  4. Frequency of Access by CPU Decreases: The CPU accesses L1 cache hundreds of millions of times per second, but accesses secondary storage only during cold startups, page faults, or disk I/O.

⏱️ Principles of Locality: Temporal vs Spatial​

The memory hierarchy succeeds solely because practical software applications do not access memory uniformly or randomly. Program memory references exhibit non-random clustering known as the Principle of Locality of Reference:

Principle of Locality: The references to memory at any given interval of time tend to be confined within a few localized areas in memory.

Locality manifests in two distinct dimensions: Temporal Locality and Spatial Locality.

Why Cache Lines Store Multiple Words​

A critical GATE and architectural interview theorem states:

📐Architectural Justification for Multi-Word Cache Blocksprinciple
More than one word are placed in a single cache line to exploit Spatial Locality of Reference.\text{More than one word are placed in a single cache line to exploit Spatial Locality of Reference.}

When the processor requests word W0W_0, a cache miss occurs. Hardware transfers an entire block containing {W0,W1,W2,…,WB−1}\{W_0, W_1, W_2, \dots, W_{B-1}\} from main memory into the cache. The subsequent accesses to W1,W2,…W_1, W_2, \dots result in guaranteed Cache Hits, completely masking main memory latency!

Word IndexByte OffsetAccess Type on Initial FetchLatency Status
W0W_0Bytes 0−30 - 3Initial Miss (Demand Fetch)High Latency (Slow Main Memory Block Transfer)
W1W_1Bytes 4−74 - 7Hit (Prefetched via Block)Zero Memory Latency (∼1 ns\sim 1\text{ ns} L1 SRAM Hit)
W2W_2Bytes 8−118 - 11Hit (Prefetched via Block)Zero Memory Latency (∼1 ns\sim 1\text{ ns} L1 SRAM Hit)
W3…W15W_3 \dots W_{15}Bytes 12−6312 - 6313 Successive HitsZero Memory Latency (∼1 ns\sim 1\text{ ns} L1 SRAM Hit)

Spatial Locality Multiplier: A single DRAM block transfer amortizes high memory access latency across 15 subsequent contiguous CPU instructions, yielding a local hit rate of 1516=93.75%\frac{15}{16} = \mathbf{93.75\%}!


🎯 Cache Hits, Miss Penalties & Block Sizing Rules​

Fundamental Cache Metrics​

  1. Cache Hit: When the CPU references a memory word and finds that word present in the cache line.
  2. Hit Ratio (HH): The fractional probability that a CPU memory reference is satisfied by the cache: H=Number of Cache HitsTotal Memory References(0≤H≤1)H = \frac{\text{Number of Cache Hits}}{\text{Total Memory References}} \qquad (0 \le H \le 1)
  3. Miss Ratio (MM): The complementary fractional probability that a referenced word is absent from cache: M=1−H=Number of Cache MissesTotal Memory ReferencesM = 1 - H = \frac{\text{Number of Cache Misses}}{\text{Total Memory References}}
  4. Hit Latency (ThitT_{\text{hit}}): The time required to compare address tags, determine presence, and route the data word into CPU registers (typically 11 to 44 clock cycles).
  5. Miss Latency / Miss Penalty (TmissT_{\text{miss}}): The total time required to service a cache miss: allocate a cache line, read the contiguous block from slow DRAM, write it into cache SRAM, and forward the requested word to the CPU execution pipeline.

Fundamental Subsystem Sizing Invariant​

Across the three primary layers of memory management, memory is subdivided into standardized allocation units:

SubsystemStorage Division UnitStandard Nominal SizeManagement Authority
Cache MemoryCache Line (or Line Frame)32 B−128 B32\text{ B} - 128\text{ B} (typically 64 B64\text{ B})Hardware Cache Controller
Main MemoryMemory Block (or Block Frame)32 B−128 B32\text{ B} - 128\text{ B} (typically 64 B64\text{ B})Hardware Bus Interface / Memory Controller
Secondary MemoryMemory Page (or Page Frame)4 KB−64 KB4\text{ KB} - 64\text{ KB}OS Virtual Memory Subsystem & MMU

Universal Rule: In any hardware cache implementation, Cache Lines and Main Memory Blocks are of the EXACT SAME SIZE. One full main memory block maps into exactly one cache line.


📐 Physical Memory Addressing: Byte vs Word Sizing​

To perform caching and mapping, the CPU must generate physical memory addresses. Understanding how address bits translate into memory geometry is foundational:

📐Core Memory Addressing Formulasformula
Memory Size=Number of Addressable Locations×Size of Each Location\text{Memory Size} = \text{Number of Addressable Locations} \times \text{Size of Each Location}Number of Addressable Locations=2n  ⟺  n=⌈log⁡2(Number of Locations)⌉\text{Number of Addressable Locations} = 2^n \iff n = \lceil \log_2(\text{Number of Locations}) \rceil

Where nn is the total physical address width in bits generated by the processor.

Standard Power-of-Two Multipliers​

In computer organization, binary memory prefixes are strictly base-2:

  • 210=1,024  ⟹  1 Kilo (K)2^{10} = 1,024 \implies 1\text{ Kilo (K)}
  • 220=1,048,576  ⟹  1 Mega (M)2^{20} = 1,048,576 \implies 1\text{ Mega (M)}
  • 230=1,073,741,824  ⟹  1 Giga (G)2^{30} = 1,073,741,824 \implies 1\text{ Giga (G)}
  • 240=1,099,511,627,776  ⟹  1 Tera (T)2^{40} = 1,099,511,627,776 \implies 1\text{ Tera (T)}
  • 250=1,125,899,906,842,624  ⟹  1 Peta (P)2^{50} = 1,125,899,906,842,624 \implies 1\text{ Peta (P)}

Byte-Addressable vs Word-Addressable Memory​

  • Byte-Addressable Memory (Industry Standard): Every individual 8-bit byte in physical RAM has a unique numerical address. A 32-bit address can reference 232 bytes=4 GB2^{32}\text{ bytes} = 4\text{ GB}.
  • Word-Addressable Memory: Each unique address points to an entire machine word (WW bytes, e.g., 2 bytes or 4 bytes). A memory with 2322^{32} locations where each word is 4 bytes stores 4 GWords=16 GB4\text{ GWords} = 16\text{ GB} of data!

Physical Address Partitioning into Block Fields​

Whenever main memory is organized into blocks of size BB bytes:

  1. Block Offset (Word Offset, ww bits): Identifies the exact byte or word within a given block: w=log⁡2(B) bitsw = \log_2(B) \text{ bits}
  2. Block Number (bb bits): Identifies which specific block in physical memory is being referenced: b=n−w=log⁡2(Main Memory SizeB) bitsb = n - w = \log_2\left(\frac{\text{Main Memory Size}}{B}\right) \text{ bits}
Physical Address FormatTotal Frame: n Bits

Generic Physical Address Decomposition

Decomposition of an n-bit CPU address into block frame number and block offset

Block Number
n - w Bits
[n-1 : w]
Block Offset
w Bits
[w-1 : 0]
n - w BitsBlock Number

Identifies unique physical memory block across the entire RAM address space.


🏭 Real-World Production Context: Row-Major Traversal & False Sharing​

1. Matrix Traversal in C/C++: Spatial Locality vs 25x Performance Drop​

In C, C++, and Python (NumPy), two-dimensional arrays are laid out in Row-Major Order: row 00 elements are stored in contiguous memory addresses, followed by row 11, row 22, and so forth:

#define N 4096
int matrix[N][N]; // Stored row-by-row in contiguous physical RAM

// IMPLEMENTATION A: Row-Major Traversal (Cache Friendly - Optimal)
for (int i = 0; i < N; i++) {
for (int j = 0; j < N; j++) {
sum += matrix[i][j]; // Contiguous memory access (stride = 1)
}
}

// IMPLEMENTATION B: Column-Major Traversal (Cache Catastrophic - 25x Slower!)
for (int j = 0; j < N; j++) {
for (int i = 0; i < N; i++) {
sum += matrix[i][j]; // Non-contiguous jump (stride = 4096 * 4 bytes = 16 KB!)
}
}

Why Implementation B Destroys Performance:

  • In Implementation A, when matrix[0][0] is loaded, the hardware pre-fetches a 64-byte cache line containing matrix[0][0] through matrix[0][15]. The next 15 loop iterations achieve a 100%100\% cache hit rate!
  • In Implementation B, accessing matrix[0][0] followed by matrix[1][0] jumps ahead by 16,384 bytes16,384\text{ bytes}. Every single element access triggers a cold cache line fetch, completely evicting previous lines. Real-world benchmarks show Implementation B running 15x to 25x slower on identical hardware!

2. The Multi-Core False Sharing Trap​

When multiple threads execute on distinct CPU cores, each core maintains its own private L1/L2 data cache:

  • If Thread 1 on Core 0 modifies variable A, and Thread 2 on Core 1 modifies independent variable B, but both variables happen to reside on the same 64-byte cache line, the CPU hardware cache coherency protocol (MESI) forces Core 1 to invalidate its entire cache line every time Core 0 writes!
  • The cache line bounces continuously between cores across the interconnect bus, causing massive memory stalls despite the threads sharing zero actual data—a performance disaster known as False Sharing.

📐 Numerical Applications & Worked Examples​

The following worked engineering problems demonstrate step-by-step physical address parsing, hit ratio analysis, and memory geometry calculations.

Example 1: Physical Address Bit-Width & Word Addressability​

Problem Statement:
A processor can support a maximum main memory capacity of 4 GB4\text{ GB}.

  1. Calculate the address bus width required if the memory is byte-addressable.
  2. Calculate the address bus width required if the memory is word-addressable, where 1 word consists of 2 bytes.
  3. Calculate the address bus width required if the memory is organized into blocks of 32 bytes32\text{ bytes}, finding the block offset and block number bit fields for the byte-addressable system.

Step-by-Step Solution:

  1. Byte-Addressable Memory Address Width:
    Total bytes in memory: Capacity=4 GB=4×230 bytes=22×230=232 bytes\text{Capacity} = 4\text{ GB} = 4 \times 2^{30}\text{ bytes} = 2^2 \times 2^{30} = 2^{32}\text{ bytes} Since each byte requires a unique address: n=log⁡2(232)=32 bitsn = \log_2(2^{32}) = \mathbf{32\text{ bits}}

  2. Word-Addressable Memory Address Width (Word = 2 Bytes):
    Total number of 2-byte word locations: Locations=4 GB2 bytes=23221=231 words\text{Locations} = \frac{4\text{ GB}}{2\text{ bytes}} = \frac{2^{32}}{2^1} = 2^{31}\text{ words} Address bus width required to address 2312^{31} unique word locations: nword=log⁡2(231)=31 bitsn_{\text{word}} = \log_2(2^{31}) = \mathbf{31\text{ bits}} (Notice: 1 bit fewer is required because the smallest addressable granule is doubled).

  3. Block Field Decomposition (Block Size B=32 bytesB = 32\text{ bytes}):

    • Block offset (ww): w=log⁡2(B)=log⁡2(32)=log⁡2(25)=5 bitsw = \log_2(B) = \log_2(32) = \log_2(2^5) = \mathbf{5\text{ bits}}
    • Block number (bb): b=n−w=32−5=27 bitsb = n - w = 32 - 5 = \mathbf{27\text{ bits}}
    • Verification: Total Blocks=4 GB32 B=23225=227  ⟹  log⁡2(227)=27 bits\text{Total Blocks} = \frac{4\text{ GB}}{32\text{ B}} = \frac{2^{32}}{2^5} = 2^{27} \implies \log_2(2^{27}) = 27\text{ bits}

Example 2: Locality Analysis of Nested Loops​

Problem Statement:
Consider a direct-mapped cache system with a block size of 16 bytes16\text{ bytes}. An array of 128128 integers (int arr[128], where each integer is 4 bytes4\text{ bytes}) is allocated in contiguous memory starting at address 00. Initially, the cache is completely empty.

A program executes the following sequential loop twice:

for (int k = 0; k < 2; k++) {
for (int i = 0; i < 128; i++) {
sum += arr[i];
}
}

Calculate:

  1. The number of cache misses during the first pass (k=0k = 0).
  2. The hit ratio (H1H_1) during the first pass (k=0k = 0).
  3. The total hit ratio across both passes (k=0k = 0 and k=1k = 1) assuming the cache is large enough to retain the entire array.

Step-by-Step Solution:

  1. Determine Integers per Cache Block:
    Integers per Block=Block SizeInteger Size=16 bytes4 bytes=4 integers\text{Integers per Block} = \frac{\text{Block Size}}{\text{Integer Size}} = \frac{16\text{ bytes}}{4\text{ bytes}} = 4\text{ integers} Each block holds elements {arr[4m],arr[4m+1],arr[4m+2],arr[4m+3]}\{\text{arr}[4m], \text{arr}[4m+1], \text{arr}[4m+2], \text{arr}[4m+3]\}.

  2. First Pass (k=0k = 0) Miss & Hit Calculation:

    • For i=0i = 0: arr[0] is not in cache   ⟹  \implies Miss. Block 0 (holding arr[0] to arr[3]) is fetched.
    • For i=1,2,3i = 1, 2, 3: arr[1], arr[2], arr[3] reside in the newly fetched block   ⟹  \implies 3 Hits (Spatial Locality).
    • For i=4i = 4: arr[4] is not in cache   ⟹  \implies Miss. Block 1 is fetched.
    • For every 4 accesses, there is exactly 1 Miss and 3 Hits.
    • Total misses in pass 1: Misses1=1284=32 misses\text{Misses}_1 = \frac{128}{4} = \mathbf{32\text{ misses}}
    • Total hits in pass 1: Hits1=128−32=96 hits\text{Hits}_1 = 128 - 32 = \mathbf{96\text{ hits}}
    • Hit Ratio in pass 1: H1=96128=34=0.75 (75%)H_1 = \frac{96}{128} = \frac{3}{4} = \mathbf{0.75 \ (75\%)}
  3. Second Pass (k=1k = 1) Calculation:
    Since the cache retains all 128 integers, every element arr[0] through arr[127] is already cached: Misses2=0,Hits2=128  ⟹  H2=1.0 (100%) (Temporal Locality)\text{Misses}_2 = 0, \qquad \text{Hits}_2 = 128 \implies H_2 = \mathbf{1.0 \ (100\%) \text{ (Temporal Locality)}}

  4. Aggregate Hit Ratio across Both Passes:
    Total References=128×2=256\text{Total References} = 128 \times 2 = 256 Total Hits=96+128=224\text{Total Hits} = 96 + 128 = 224 Total Misses=32+0=32\text{Total Misses} = 32 + 0 = 32 Hoverall=224256=0.875 (87.5%)H_{\text{overall}} = \frac{224}{256} = \mathbf{0.875 \ (87.5\%)}


Example 3: Effective Memory Access Time & Speedup Requirement​

Problem Statement:
A CPU has an on-chip cache with an access time of 2 ns2\text{ ns} and an off-chip main memory with an access time of 80 ns80\text{ ns}.

  1. If the current cache hit ratio is 80%80\%, calculate the Effective Memory Access Time (EMAT\text{EMAT}) assuming hierarchical memory access.
  2. Determine the minimum hit ratio (Hmin⁡H_{\min}) required to reduce the EMAT\text{EMAT} to under 5 ns5\text{ ns} (a 16x speedup over raw main memory).

Step-by-Step Solution:

  1. Calculate EMAT with H=0.80H = 0.80 (Hierarchical Access):
    In hierarchical access, the CPU first checks the cache (TCT_C). On a miss (1−H1 - H), it must access main memory (TMT_M): EMAT=H×TC+(1−H)×(TC+TM)\text{EMAT} = H \times T_C + (1 - H) \times (T_C + T_M) Substitute the given values: EMAT=0.80×2 ns+(1−0.80)×(2 ns+80 ns)\text{EMAT} = 0.80 \times 2\text{ ns} + (1 - 0.80) \times (2\text{ ns} + 80\text{ ns}) EMAT=1.6 ns+0.20×82 ns=1.6 ns+16.4 ns=18.0 ns\text{EMAT} = 1.6\text{ ns} + 0.20 \times 82\text{ ns} = 1.6\text{ ns} + 16.4\text{ ns} = \mathbf{18.0\text{ ns}} (Notice: Even with an 80% hit rate, the 20% misses to slow memory dominate the total access time!).

  2. Calculate Minimum Hit Ratio for EMAT≤5 ns\text{EMAT} \le 5\text{ ns}:
    H×TC+(1−H)×(TC+TM)≤5H \times T_C + (1 - H) \times (T_C + T_M) \le 5 H×2+(1−H)×82≤5H \times 2 + (1 - H) \times 82 \le 5 2H+82−82H≤52H + 82 - 82H \le 5 −80H+82≤5-80H + 82 \le 5 −80H≤−77  ⟹  80H≥77-80H \le -77 \implies 80H \ge 77 H≥7780=0.9625 (96.25%)H \ge \frac{77}{80} = \mathbf{0.9625 \ (96.25\%)} Architectural Conclusion: To achieve high performance, the cache hit ratio must exceed 96.25%96.25\%!


🎯 Exam & Interview Pitfall Check​

Core Conceptual Questions
  • Why does increasing cache block size beyond a certain point DEGRADE overall system performance?
    Up to a point (32 B32\text{ B} to 64 B64\text{ B}), increasing block size exploits spatial locality, raising hit rates. However, if block size is made too large (e.g., 1 KB1\text{ KB}):

    1. For a fixed cache capacity, larger blocks mean fewer total cache lines, drastically increasing Conflict Misses.
    2. Bringing massive blocks across the memory bus significantly increases the Miss Penalty (transfer time).
    3. Much of the fetched block may never be referenced by the CPU, wasting bus bandwidth and polluting the cache.
  • What is the difference between Inboard and Outboard memory in CPU architecture?
    Inboard memory (Registers, L1/L2/L3 Cache, Main Memory) is directly connected to the CPU datapath and system bus, addressable by machine instructions in nanoseconds, and volatile. Outboard memory (SSDs, HDDs, Tapes) connects via I/O peripheral controllers and DMA buses, is block-addressed in microseconds or milliseconds, and is non-volatile.

Common Interview Traps
  • Trap: Confusing Word Addressability with Byte Addressability.
    Never assume a 4 GB4\text{ GB} memory always requires a 32-bit address bus. If the exam specifies “the memory is 16-bit (2-byte) word-addressable”, the number of addressable locations is 2312^{31}, requiring only 31 address lines! Always inspect whether the smallest addressable unit is a byte or a multi-byte word.

  • Trap: Believing Temporal Locality is Improved by Larger Block Sizes.
    Candidates frequently state that larger block sizes improve temporal locality. This is false! Larger block sizes improve Spatial Locality (fetching nearby words). Temporal locality depends strictly on cache capacity and replacement policy (retaining recently used blocks for future reuse).


💬

Discussion & Doubts