Answer:
a. 16
b. 1.75
Step-by-step explanation:
Number of bits used for block offset = log 64 = 6.
Number of sets in the cache = 256K/(64 * 4) = 1K
Number of bits for index = log 1K = 10
Number of bits for tag = 32 - (10 + 6) = 16
Now,
CPI = CPIexecution + StallCyclesPerInstruction
For computer that always hits, CPI would be 1 i,e CPI = 1
Now let us compute StallCyclesPerInstruction for computer with non-zero miss rate
StallCyclesPerInstruction = (Memory accesses per instr) * miss rate * miss penalty
Memory accesses per instruction = 1 + 0.5 (1 instruction access + 0.5 data access)
StallCyclesPerInstruction = 1.5 * 0.02 * 25 = 0.75
Therefore, CPI = 1.75
Hence the computer with no cache misses is 1.75 times faster.