IAE Academy

Memory & cache formulas

Memory hierarchy, performance and cache mapping. 13 formulas for GATE CS Computer Organization and Architecture, each with when to use it. Each is explained in the topic notes.

All 13 Memory & cache formulas

HIT RATIO

The fraction of memory references satisfied directly by the cache. Miss ratio .

AVERAGE ACCESS TIME, HIERARCHICAL (SERIAL) ACCESS

Use this when main memory is accessed only after the cache lookup has missed, so a miss costs . is the time to get the needed data from main memory. If the question says a whole block is transferred into the cache on a miss and gives the block-transfer time, use that time as the miss cost in place of a single-word .

AVERAGE ACCESS TIME, SIMULTANEOUS ACCESS

Use this when the cache and main memory are looked up in parallel. On a miss, the cache-check time is hidden inside the longer memory access and is not added again.

AVERAGE ACCESS TIME FROM A STATED MISS PENALTY

The miss penalty is the EXTRA time a miss costs on top of the hit time. With hierarchical access and , this is the same as the hierarchical formula above.

SIZE OF THE TAG DIRECTORY

Number of lines cache size block size, whatever the associativity. The extra bits per line are whatever the question specifies. Typically that is a valid bit, a dirty bit for a write-back cache, and any replacement bits.

AVERAGE MEMORY ACCESS TIME, TWO-LEVEL CACHE

Model: L2 is accessed only on an L1 miss, and main memory only on an L2 miss, with each lower-level time added on top (hierarchical). here is the LOCAL miss rate of L2: misses in L2 accesses that reach L2 (the L1 misses). It is not the global miss rate.

GLOBAL MISS RATE OF L2

The fraction of ALL CPU accesses that miss in both L1 and L2 and go to main memory. If a question gives a global L2 miss rate, divide it by to get the local rate before using the AMAT formula.

CHIPS NEEDED TO BUILD AN M X W MEMORY FROM M X B CHIPS

Here and are numbers of words, and and are bits per word. Each row places chips side by side to form the full word width. rows are stacked to supply all the words. The memory needs address lines. Each chip takes the low of them, and the remaining high-order bits drive a decoder that selects one row.

TIME TO FETCH AN N-WORD BLOCK FROM LOW-ORDER INTERLEAVED MEMORY WITH M >= N BANKS

Model: all banks start their access together. The first word is on the bus after (the bank access time, including placing the word on the bus). Each further word, already read in its own bank, needs only one bus transfer time . Questions may define the timing differently, for example with a separate address-send cycle. Use the question's model when it gives one.

TIME TO FETCH AN N-WORD BLOCK, NO INTERLEAVING

Same model with a single bank: each word is a full, separate access. This is the baseline against which the speedup from interleaving is measured.

DISK ACCESS TIME

Seek: moving the head to the correct track. Rotational latency: waiting for the target sector to rotate under the head. Transfer: reading or writing the data once positioned. Add a controller overhead only if the question gives one. Unless stated otherwise, a given seek time is taken as the average seek time.

AVERAGE ROTATIONAL LATENCY

Half the time of one revolution, in seconds (RPM = revolutions per minute). This is the AVERAGE. The worst case is a full revolution and the best case is zero.

DATA TRANSFER TIME

One track passes under the head per revolution, so the transfer rate is the track capacity times the revolutions per second. Equivalently, reading one sector takes (revolution time) (sectors per track).

Where this was asked: 2018 (2), 2020 (3), 2022 (3), 2023 (2), 2024 (4), 2025 (4), 2026 (4). See the 22 previous-year questions on Memory & cache. This shows what was asked, not what will be asked.