Chapter 1 • CPU cache access cost • explore, don't memorize

CPU Cache Access-Cost Lab

Choose a data block, make a prediction, then issue the request. Watch a transparent teaching hierarchy move the block through L1, L2, L3, or RAM using artificial access-cost units.

Issue one request

Pick a block A–J. Predict the serving level if you want a learning prompt, then issue it. This is an exploratory workbench, not a scored quiz.

Select a block to begin. The model starts cold.

Keyboard: Tab to controls, arrow keys in selects, R resets, T toggles theme.

Live trace

Before each update, the first cache containing the requested block is the hit source. A miss reaches RAM, then the block becomes most recent.

No request yet
Requests0
Total modeled access cost0 units
Mean cost / read—
Most recent order—

Stats and history currently include all requests; the retained window is 200 requests.

    Reference fixture table

    Each row starts with empty caches. The second pass is deliberately shaped to probe one serving level exclusively; request counts differ, so raw totals are not a proportional CPU-performance claim.

    Toy units only
    Independent two-pass fixtures using the same inclusive 2 / 4 / 8-block teaching model.
    Working setRequestsTotal unitsMean / readPass 2 sourceSource counts

    Pin this run

    Save the current trace as an explicit snapshot, then run another sequence to compare how the observed mix changes.

    No run pinned yet. Run a request or fixture, then pin it.

    Interpretation: the second pass fits progressively farther levels as the working set grows. These dimensionless values compare this fixture only; they are not nanoseconds, cycles, manufacturer measurements, or a CPU benchmark.

    Fresh-transfer checkpoint

    A supplied prefix is visible and the next request is named, but transfer cache contents, serving level, and result stay hidden until your first prediction is submitted.

    First attempt preserved
    Run the supplied prefix. No current cache contents or hit-source hint is shown before you commit.

    Supplied unseen prefix

    Next request: B

    Predict which level serves request B

    Reset lab?

    This clears the trace, pinned snapshot, and transfer attempt while preserving your theme.

    Enlarged teaching hierarchy

    Same canonical cache order as the live diagram. This is a symbolic fixture view, not physical CPU anatomy.

    Escape closes this view and returns focus to the Enlarge hierarchy button.

    Evidence and boundaries

    1A teaching anchorTypical L1→L2→L3 levels tend to increase in size and access cost, but exact layouts vary. Adding a DIMM cannot upgrade CPU cache.
    1B teaching anchorCPU caches can reduce access latency for frequent data and instructions; capacity alone does not predict every workload.
    1C teaching anchorCPU caches commonly use SRAM: powered contents do not need DRAM-style refresh, but cache contents remain volatile.

    Fixture choices, clearly separated from hardware facts

    Source mapping: CH1 Paid StudyBrain Photorealistic Release Candidate.html, SHA-256 a13892beef17d4f1f89b3b3a19bfdc5ec7448ccfbf332f67cbf8f4b6c3528aad, MODULES 1A REVIEW[4], 1B REVIEW[9], 1C REVIEW[14]. Objective context: 220-1201 sections 3.3 and 3.5.

    Primary corroboration: Intel cache hierarchy comparison (families can differ, including inclusive/non-inclusive examples) and Intel Memory Performance in a Nutshell (locality, placement, latency, and cache/main-memory distinctions).