LOCALITY: TEMPORAL_&_SPATIAL
AMAT = HIT_T + (MR * MISS_P)
ARCHITECTURE: HIERARCHICAL
STATE: OPTIMIZING_ACCESS
ASKiIMAN™ DOOR 01 / FOUNDATIONS / REALM 05
--:-- · -- --- ----

Ontological Layer: Physical Data Storage

The Memory Hierarchy

The Layers Between Thought and Storage

The Impossible Memory

Computer architects want an impossible paradox: memory that is as fast as a CPU register, as massive as a hard drive, and costs nothing. Because no single physical technology can do this, we build a pyramid. Fast, expensive memory sits at the top near the CPU, caching data pulled from the slower, cheaper, massive storage at the bottom. Realm 05 explores the physical realities, mapping strategies, and access mathematics that make this illusion of infinite, instantaneous memory possible.

CPU REQUEST → REGISTERS (FASTEST) → L1/L2 CACHE → HIT (O(1)) vs MISS (PENALTY) → MAIN MEMORY (DRAM) → SECONDARY STORAGE

The 12 Memory Chambers

Ontological Mapping: From Registers to Persistent Storage

CHAMBER 01

The Idea of Memory

1A
2B
FF
  • Storage of data and instructions
  • Addressable memory locations
  • Read and Write operations
  • Latency vs Bandwidth basics
CHAMBER 02

Memory Hierarchy

  • Speed vs Capacity vs Cost trade-off
  • Registers → Cache → RAM → Storage
  • Distance from the CPU core
  • The illusion of fast, infinite memory
CHAMBER 03

Access & Addressing

  • Address bus width determines capacity
  • Data bus width determines throughput
  • Byte-addressable vs Word-addressable
  • Read/Write control signals
CHAMBER 04

Cache Memory

  • SRAM buffer close to CPU
  • L1, L2, L3 architectural levels
  • Cache Hits (Fast) vs Misses (Penalty)
  • Unified vs Split (Instruction/Data)
CHAMBER 05

Locality of Reference

  • Why small caches work effectively
  • Temporal Locality (Reuse same item)
  • Spatial Locality (Use nearby items)
  • Sequential code execution loops
CHAMBER 06

Cache Mapping

  • Direct Mapped (1 slot per block)
  • Fully Associative (Any slot)
  • N-Way Set Associative (Hybrid)
  • Tag comparison and Indexing
CHAMBER 07

Policies

  • Replacement: LRU, FIFO, Random
  • Write-Through (Sync immediately)
  • Write-Back (Sync only on eviction)
  • Dirty bits and write allocation
CHAMBER 08

RAM Technologies

  • SRAM (Flip-flops, fast, expensive, Cache)
  • DRAM (Capacitors, slow, cheap, Main RAM)
  • The need for constant DRAM refresh
  • Volatile nature of RAM
CHAMBER 09

Non-Volatile Memory

  • ROM (Permanent firmware)
  • EEPROM (Electrically erasable)
  • Flash Memory (Block-erasable, SSDs)
  • Read-only vs Reprogrammable constraints
CHAMBER 10

Memory Expansion

  • Word width expansion (Parallel chips)
  • Capacity expansion (Address decoding)
  • Memory Banks and Modules
  • Interleaved memory for bandwidth
CHAMBER 11

Performance & ECC

  • Average Memory Access Time (AMAT)
  • Miss Penalty impact calculations
  • Soft errors vs Hard faults
  • Error Correcting Codes (ECC)
FINAL PROTOCOL

12 — AMAT & Mapping Laboratory

1. ADDR = TAG(10) | IDX(4) | OFF(2)
2. L1 MISS -> L2 HIT -> CACHE FILL
3. AMAT = 1ns + (0.05 * 20ns) = 2ns
[1] CALCULATE AMAT [2] PARSE ADDRESS BITS [3] IDENTIFY MISS TYPE [4] TRACE WRITE-BACK [5] EXPAND CAPACITY

You now understand the physical reality of memory: it is tiered, structured, and carefully managed by hardware to hide its inherent slowness. But how does an operating system safely share this limited physical RAM among dozens of running programs simultaneously? This leads directly into Realm 06: Virtual Memory.

HARDWARE DIAGNOSTIC RUNNING