Professional Documents
Culture Documents
Architecture
1. A CPU with 32-bit main memory addressing system, has a 4-way set associative cache of
size 64KB. The block size is 8 words (each word is 4 bytes).
i) Show the address subdivision(tag/index/offset) of a main memory reference (show
stepwise calculations)
ii) Draw the structure of the cache organization
iii) Calculate the total size of cache in bits
= 7.80/ 2 = 3.9 (i.e.) a processor with a perfect cache that never missed would run 3.9
times faster than a processor with a cache that would miss
ii) if the CPU is optimized so that the base CPI is 1, how much faster a processor with a
perfect cache that never missed would run
6.80/1 = 6.80 (i.e.) a processor with a perfect cache that never missed would run 6.8 times
faster than a processor with a cache that would miss
3. A CPU has base CPI of 2 without stalls and I-Cache, D-Cache miss rate of 2% and 4%
respectively. The miss penalty of a memory reference is 100 clock cycles. The loads & stores
contribute to 36% of the instructions. Compute.
i) CPI of the CPU with the stalls and how much faster a processor would run with a perfect
cache that never missed
ii) If the CPU is optimized so that the base CPI is 1, how much faster a processor with a
perfect cache that never missed would run?
i) Miss cycles/Instr : I-Cache = 0.02 * 100 = 2, D-Cache : 0.36 * .04 * 100 = 1.44
Actual CPI = Base CPI + I-Cache Miss Cycles/Instr + D-Cache Miss Cycles/Instr
= 2 + 2 + 1.44 = 5.44
Since there is no change in instruction count or clock rate, the ratio of the CPU
execution times is
= 5.44/ 2 = 2.72 (i.e.) a processor with a perfect cache that never missed would run 2.72
times faster than a processor with a cache that would miss
ii) if the CPU is optimized so that the base CPI is 1, how much faster a processor with a
perfect cache that never missed would run
4.44/1 = 4.44 (i.e.) a processor with a perfect cache that never missed would run 4.44 times
faster than a processor with a cache that would miss