هذي اسئلة لل miss & hit rate
Average memory access time (AMAT)
AMAT = Hit time + Miss rate × Miss penalty
Example
CPU with 1ns clock, hit time = 1 cycle, miss penalty = 20 cycles, I-cache miss rate = 5%
AMAT = 1 + 0.05 × 20 = 2ns
كود:
2 cycles per instruction
================
Suppose we have a processor with the following parameters:
–Base CPI=1.0, if hit in the L1 cache. L1 cache miss rate is 2%. Clock rate is 5 GHz. Memory access time is 100 ns, including all the miss handling.
كود:
–Miss penalty to main memory is 100ns/0.2 = 500 clock cycles.
–Total CPI = 1.0 + 2%×500 = 11.0
If we add a L2 cache that has 5 ns access time. L2 global miss rate = 0.5%
كود:
–Miss penalty to L2 is 5ns/0.2 = 25 clock cycles
–Total CPI = 1.0+ 2%×25 + 0.5%×500 = 4.0