Question:medium

Given a computing system with two levels of cache (L1 and L2) and a main memory. The first level (L1) cache access time is 1 nanosecond (ns) and the “hit rate” for L1 cache is 90% while the processor is accessing the data from L1 cache. Whereas, for the second level (L2) cache, the “hit rate” is 80% and the “miss penalty” for transferring data from L2 cache to L1 cache is 10 ns. The “miss penalty” for the data to be transferred from main memory to L2 cache is 100 ns. Then the average memory access time in this system in nanoseconds is ___________ . (rounded off to one decimal place)

Show Hint

When calculating AMAT, always account for both the hit time and the miss penalty of each cache level.
Updated On: Jan 30, 2026
Show Solution

Correct Answer: 4

Solution and Explanation

Every memory access first checks the level-1 cache, which responds in \(1\,\text{ns}\). In \(90\%\) of the cases, the data is found there and no further delay is incurred.

In the remaining \(10\%\) of accesses, the request proceeds to level-2 cache. Accessing level-2 takes \(10\,\text{ns}\). Of these level-2 accesses, \(80\%\) are successful, while \(20\%\) require fetching data from main memory, which adds an additional delay of \(100\,\text{ns}\).

Thus, when level-1 misses, the average extra delay incurred is:

\(10 + 0.20 \times 100 = 30\,\text{ns}\)

Since this situation occurs only \(10\%\) of the time, the contribution of these slower accesses to the overall average is:

\(0.10 \times 30 = 3\,\text{ns}\)

Adding this to the initial level-1 access time gives the average memory access time:

\(1 + 3 = \boxed{4.0\,\text{ns}}\)

Was this answer helpful?
0