210k views
3 votes
A computer system has a two-level cache processor with the following characteristics:

Level 1:

Split configuration with:

I miss rate 4%
D miss rate 8%
Frequency of data accesses is 50%
Hit time at Level1 is 0.8ns
Level 2 cache:

Unified configuration with:

Miss rate 25%
Hit time at Level 2 is 3 ns
The main memory exhibits 50 ns access time.



Find the AMAT if only level1 was used, and when both levels are used.

Compare the AMAT for:

the system with only L1
the system with L1 and L2

User SWdV
by
8.5k points

1 Answer

2 votes

Answer:

Step-by-step explanation:

To find the AMAT (Average Memory Access Time), we need to use the following formula:

AMAT = Hit time at Level 1 + L1 miss rate * (Hit time at Level 2 + Memory access time)

For only L1:

The frequency of data accesses that hit in L1 cache is 1 - 0.04 = 0.96. Therefore, the average memory access time for only L1 is:

AMAT = 0.8ns + 0.04 * (0 + 50ns) = 2.0ns

For L1 and L2:

The frequency of data accesses that miss in L1 cache is 1 - 0.96 = 0.04. The frequency of data accesses that hit in L1 and miss in L2 is 0.04 * 0.25 = 0.01. Therefore, the average memory access time for L1 and L2 is:

AMAT = 0.8ns + 0.04 * (3ns + 50ns) + 0.01 * (3ns + 50ns + 50ns) = 2.12ns

Comparing the AMAT for the two systems, we can see that using both L1 and L2 caches increases the average memory access time slightly from 2.0ns to 2.12ns. However, this increase in access time is offset by the benefits of using a larger cache size and reducing the frequency of accesses to main memory, which can lead to overall performance improvements.

User Gugoan
by
8.2k points