




















































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





















































































A Quantitative Approach, Fifth Edition
◼ Data contained in a lower level is a superset of the next higher level
◼ Main memory in the case of caches ◼ Disk memory in the case of virtual memory
◼ 1980 performance as a baseline 64 KB DRAM ◼ Gap in performance as the difference in time between processor memory requests (for 1 core/processor) and latency of a DRAM access plotted over time ◼ Vertical axis is a log-scale to record the size of the processor–DRAM performance gap ◼ Baseline memory in 1980 with a 1.07 per year performance improvement in latency ◼ The processor line assumes: ◼ 1.25 improvement per year until 1986 ◼ 1.52 improvement per year until 2000 ◼ 1.20 improvement between 2000 and 2005 ◼ No change in processor performance (on a per-core basis) between 2005 and 2010
◼ Static power when not operating caused by leakage current ◼ Dynamic (active) power when performing a read/write (called dynamic power)
◼ Caches can account for 25% to 50% of the total power consumption ◼ Designers must consider both performance and power trade-offs
◼ Each cache block includes a tag to indicate which memory address it corresponds to. ◼ A key design decision is where blocks can be placed in a cache
◼ Latency: determines the time to retrieve the first word of the block ◼ Bandwidth: determines the time to retrieve the rest of the block
◼ Temporal locality: Requested word might be needed again in the near future, place it in the cache where it can be accessed quickly ◼ Spatial locality: There is a high probability that the other data in the block will be needed soon
◼ With out-of-order execution, it causes processors to stall until data is available ◼ Without out-of-order execution, it causes processors to behave as: ◼ Result instruction must still wait ◼ Other instructions may proceed during the miss
◼ Q1: Where can a block be placed in the upper level? (block placement) ◼ Q2: How is a block found if it is in the upper level? (block identification) ◼ Q3: Which block should be replaced on a miss? (block replacement) ◼ Q4: What happens on a write? (write strategy)
◼ Direct Mapped: Each block has only one place it can appear in the cache with mapping: ◼ (Block address) MOD (Number of blocks in cache) ◼ Fully Associative: A block can be placed anywhere in the cache ◼ Set Associative: A block can be placed in a restricted set of places in the cache
◼ (Block address) MOD (Number of sets in cache)
Figure B.2 This example cache has 8 block frames and memory has 32 blocks
◼ First reference to a block (first access to a block cannot be in the cache, so the block must be brought into the cache)
◼ Blocks discarded and later retrieved (If the cache cannot contain all the blocks needed during execution of a program)
◼ Program makes repeated references to multiple addresses from different blocks that map to the same location in the cache ◼ If the block placement strategy is not fully associative, conflict misses will occur because a block may be discarded and later retrieved if multiple blocks map to its set and accesses to the different blocks are intermingled
◼ Compulsory misses are independent of cache size ◼ Capacity misses decrease as capacity increases ◼ Conflict misses decrease as associativity increases ◼ Note that a direct-mapped cache of size N has about the same miss rate as a two-way set-associative cache of size N /2 up through 128 K. ◼ Caches larger than 128 KB do not prove that rule. Note that the Capacity column is also the fully associative miss rate. Data were collected as in Figure B.4 using LRU replacement