Skip to content

GATE CS 2006 Q41 — Memory Hierarchy: Cache, Main Memory and Secondary Storage

Explain with AI

A CPU has a cache with block size 6464 bytes. The main memory has kk banks, each bank being cc bytes wide. Consecutive cc − byte chunks are mapped on consecutive banks with wrap-around. All the kk banks can be accessed in parallel, but two accesses to the same bank must be serialized. A cache block access may involve multiple iterations of parallel bank accesses depending on the amount of data obtained by accessing all the kk banks in parallel. Each iteration requires decoding the bank numbers to be accessed in parallel and this takes k2ns\frac{k}{2} ns.The latency of one bank access is 8080 ns. If c=2c = 2 and k=24k = 24, the latency of retrieving a cache block starting at address zero from main memory is:

Choose one option
View worked solution

Answer: D

To find the total latency of retrieving the cache block, we can break down the process into step-by-step calculations:

1. Analyze the Memory Configuration

  • Cache block size: 6464 bytes
  • Number of banks (kk): 2424
  • Bank width (cc): 22 bytes

2. Determine the Number of Iterations

In a single parallel access, all kk banks can be accessed simultaneously. Since each bank is cc bytes wide, the maximum data retrieved in one parallel iteration is:

Max data per iteration=k×c=24×2=48 bytes\text{Max data per iteration} = k \times c = 24 \times 2 = 48\text{ bytes}

To retrieve a 6464-byte cache block:

  • Iteration 1: Accesses all 2424 banks in parallel to retrieve the first 4848 bytes (addresses 00 to 4747).
  • Iteration 2: Accesses the first 88 banks in parallel to retrieve the remaining 1616 bytes (addresses 4848 to 6363).

Thus, exactly 22 iterations are required to retrieve the entire cache block.

3. Calculate Latency per Iteration

Each iteration consists of two sequential phases:

  1. Decoding phase: Takes k2 ns=242=12 ns\frac{k}{2}\text{ ns} = \frac{24}{2} = 12\text{ ns}.
  2. Bank access phase: Takes 80 ns80\text{ ns}.
Latency per iteration=12 ns+80 ns=92 ns\text{Latency per iteration} = 12\text{ ns} + 80\text{ ns} = 92\text{ ns}

4. Calculate Total Latency

Since the two iterations must be performed sequentially:

Total Latency=2×92 ns=184 ns\text{Total Latency} = 2 \times 92\text{ ns} = 184\text{ ns}

Therefore, the correct option is D.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Memory Hierarchy: Cache, Main Memory and Secondary Storage questions