Académique Documents
Professionnel Documents
Culture Documents
1999 UCB
What else to reduce miss penalty? Add a second level (L2) cache.
2 1999 UCB
Secondary Memory
Speed(ns): 0.5ns 2ns 6ns 100ns 10,000,000ns Size (MB): 0.0005 0.05 1-4 100-1000 100,000 Cost ($/MB): -$100 $30 $1 $0.05 Technology: Regs SRAM SRAM DRAM Disk
1999 UCB
1999 UCB
Access time = L1 hit time * L1 hit rate + (L2 hit time * L2 hit rate + L2 miss penalty * (1 - L2 hit rate) ) * L1 miss rate
The CPI is reduced to 1.0 + 5% x (10 + 40% x 100) = 3.5. Thus, the m/c with secondary cache is faster by 6.0/3.5 = 1.7
7 1999 UCB
- Capacity misses: Because the cache cannot contain all the blocks for its limited size reduces by increasing cache size
- Conflict misses: Because multiple blocks compete for the same block or set in the cache. Also called collision misses. reduces by increasing associativity See Fig. 7.30 for performance
8 1999 UCB
The CPI is reduced to 1.0 + 5% x (10 + 40% x 100) = 3.5. Thus, the m/c with secondary cache is faster by 6.0/3.5 = 1.7
9 1999 UCB
1999 UCB
11
1999 UCB
13
1999 UCB
Bus
Bus
Memory
Memory bank 0
Memory bank 1
Memory bank 2
Memory bank 3
Memory
With main memory and bus width of 2 words (fig. 7.13b), miss penalty = 1 + 2x15 + 2x1 = 33 cycles. For 4-word wide memory, miss penalty is 17 cycles. Expensive due to wide bus and control circuits.
With interleaved memory of 4 memory banks and same bus width (fig. 7.13c), the miss penalty = 1 + 1x15 + 4x1 = 20 cycles. The memory controller must supply consecutive addresses to different memory banks. Interleaving is universally adapted in high-performance computers.
15 1999 UCB