Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. What is the access time for a 32-bit word if your Cache Hit Rate is 98%. Memo

ID: 3747526 • Letter: 1

Question

1. What is the access time for a 32-bit word if your Cache Hit Rate is 98%. Memory access time for a byte is 1 microsecond and cache operate at half the clock speed. The CPU is a 1 GHz processor with double clocking. Be specific in your assumptions. How could you increase CHR?

an example provided:

Memory Access Time == 5 nsec

Clock speed 1 gHz è 1 nsec

Reasonable to assume a Cache Access of 2 nec

CHR = 99%

Assumptions:   CPU knows the cache

Average Memory Access Time == 2nec (99%) + 5nec(1%)

2nsec

HDD access – 20 msec

MHR = 95%

AMAT(95%) + 5%(20 msec)

Explanation / Answer

Given data,

Memory access time for a byte = 1 µs

Clock speed                                        = 1G Hz

Cache operates at half the clock speed

Cache hit rate                                    = 98%

Assumptions:

Let the Main memory hit rate be = 95%

Hard Disk Drive access time be = 20ms

#Step 1: calculate cache access time

Give cache operates at half clock speed, which means one byte of data can be retrieved from the cache in half the clock speed.

Cache access time = 1/ (1/2 G Hz) = 2 ns

#Step 2: calculate Effective Access Time for a byte from main memory

Effective memory access time = hit rate * cache access time + (1-hit rate) * memory access time

EAT of a byte to access from main memory = 0.98 * 2 ns + 0.02 * 1 µs = 21.96 ns

#Step 3: calculate the access time for a byte from hard disk

EAT        = 0.95 * 21.96ns + 0.05 * 20 ms = 1.000020862 ms = approximately, 1 ms

#Step 4: Calculate access time for 32-bit word

32 bits = 4 bytes

Hence access time for a 32-bit word will be 4 ms approximately.

How could you increase the cache hit rate:

One way to increase the cache hit rate is by increasing the cache block size. However, very large sized cache blocks can increase miss penalty and increase the access time.

Also, higher associativity can improve the cache hits rates but increasing associativity seamlessly can increase the cache hit times.