Computer Design 2007 – Caches 1 Dr. Lihu Rappoport Some of the slides were taken from Avi Mendelson, Randi Katz, Patterson, Gabriel Loh MAMAS – Computer.

Slides:



Advertisements
Similar presentations
Lecture 8: Memory Hierarchy Cache Performance Kai Bu
Advertisements

Lecture 12 Reduce Miss Penalty and Hit Time
CMSC 611: Advanced Computer Architecture Cache Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material adapted from.
1 Adapted from UCB CS252 S01, Revised by Zhao Zhang in IASTATE CPRE 585, 2004 Lecture 14: Hardware Approaches for Cache Optimizations Cache performance.
Computer Architecture 2008 – Caches 1 Dr. Lihu Rappoport Some of the slides were taken from Avi Mendelson, Randi Katz, Patterson, Gabriel Loh Computer.
Technical University of Lodz Department of Microelectronics and Computer Science Elements of high performance microprocessor architecture Memory system.
© Karen Miller, What do we want from our computers?  correct results we assume this feature, but consider... who defines what is correct?  fast.
Computer Architecture Cache Memory
1 COMP 206: Computer Architecture and Implementation Montek Singh Wed., Nov. 10, 2003 Topic: Caches (contd.)
1  1998 Morgan Kaufmann Publishers Chapter Seven Large and Fast: Exploiting Memory Hierarchy.
1 Chapter Seven Large and Fast: Exploiting Memory Hierarchy.
1 COMP 206: Computer Architecture and Implementation Montek Singh Mon, Oct 31, 2005 Topic: Memory Hierarchy Design (HP3 Ch. 5) (Caches, Main Memory and.
Memory Hierarchy Design Chapter 5 Karin Strauss. Background 1980: no caches 1995: two levels of caches 2004: even three levels of caches Why? Processor-Memory.
ENGS 116 Lecture 121 Caches Vincent H. Berk Wednesday October 29 th, 2008 Reading for Friday: Sections C.1 – C.3 Article for Friday: Jouppi Reading for.
Memory Hierarchy & Cache Memory © Avi Mendelson, 3/ MAMAS – Computer Architecture Lectures 3-4 Memory Hierarchy and Cache Memories Dr. Avi.
EENG449b/Savvides Lec /13/04 April 13, 2004 Prof. Andreas Savvides Spring EENG 449bG/CPSC 439bG Computer.
ENEE350 Ankur Srivastava University of Maryland, College Park Based on Slides from Mary Jane Irwin ( )
1 COMP 206: Computer Architecture and Implementation Montek Singh Wed, Nov 9, 2005 Topic: Caches (contd.)
331 Lec20.1Spring :332:331 Computer Architecture and Assembly Language Spring 2005 Week 13 Basics of Cache [Adapted from Dave Patterson’s UCB CS152.
1 COMP 206: Computer Architecture and Implementation Montek Singh Wed., Oct. 30, 2002 Topic: Caches (contd.)
CS 524 (Wi 2003/04) - Asim LUMS 1 Cache Basics Adapted from a presentation by Beth Richardson
Computer Architecture Cache Memory
Reducing Cache Misses 5.1 Introduction 5.2 The ABCs of Caches 5.3 Reducing Cache Misses 5.4 Reducing Cache Miss Penalty 5.5 Reducing Hit Time 5.6 Main.
Computer ArchitectureFall 2007 © November 12th, 2007 Majd F. Sakr CS-447– Computer Architecture.
Systems I Locality and Caching
CMPE 421 Parallel Computer Architecture
Lecture 10 Memory Hierarchy and Cache Design Computer Architecture COE 501.
10/18: Lecture topics Memory Hierarchy –Why it works: Locality –Levels in the hierarchy Cache access –Mapping strategies Cache performance Replacement.
CS1104 – Computer Organization PART 2: Computer Architecture Lecture 10 Memory Hierarchy.
CSIE30300 Computer Architecture Unit 08: Cache Hsin-Chou Chi [Adapted from material by and
3-May-2006cse cache © DW Johnson and University of Washington1 Cache Memory CSE 410, Spring 2006 Computer Systems
1010 Caching ENGR 3410 – Computer Architecture Mark L. Chang Fall 2006.
Computer Organization & Programming
Lecture 08: Memory Hierarchy Cache Performance Kai Bu
Spring 2003CSE P5481 Advanced Caching Techniques Approaches to improving memory system performance eliminate memory operations decrease the number of misses.
1 Chapter Seven. 2 Users want large and fast memories! SRAM access times are ns at cost of $100 to $250 per Mbyte. DRAM access times are ns.
M E M O R Y. Computer Performance It depends in large measure on the interface between processor and memory. CPI (or IPC) is affected CPI = Cycles per.
Nov. 15, 2000Systems Architecture II1 Machine Organization (CS 570) Lecture 8: Memory Hierarchy Design * Jeremy R. Johnson Wed. Nov. 15, 2000 *This lecture.
DECStation 3100 Block Instruction Data Effective Program Size Miss Rate Miss Rate Miss Rate 1 6.1% 2.1% 5.4% 4 2.0% 1.7% 1.9% 1 1.2% 1.3% 1.2% 4 0.3%
CS.305 Computer Architecture Memory: Caches Adapted from Computer Organization and Design, Patterson & Hennessy, © 2005, and from slides kindly made available.
Caches Hiding Memory Access Times. PC Instruction Memory 4 MUXMUX Registers Sign Ext MUXMUX Sh L 2 Data Memory MUXMUX CONTROLCONTROL ALU CTL INSTRUCTION.
CPE232 Cache Introduction1 CPE 232 Computer Organization Spring 2006 Cache Introduction Dr. Gheith Abandah [Adapted from the slides of Professor Mary Irwin.
CS6290 Caches. Locality and Caches Data Locality –Temporal: if data item needed now, it is likely to be needed again in near future –Spatial: if data.
1 Chapter Seven. 2 Users want large and fast memories! SRAM access times are ns at cost of $100 to $250 per Mbyte. DRAM access times are ns.
Computer Structure 2015 – Caches 1 Lihu Rappoport and Adi Yoaz Computer Structure Cache Memory.
1 Chapter Seven. 2 SRAM: –value is stored on a pair of inverting gates –very fast but takes up more space than DRAM (4 to 6 transistors) DRAM: –value.
Memory Hierarchy— Five Ways to Reduce Miss Penalty.
Memory Management memory hierarchy programs exhibit locality of reference - non-uniform reference patterns temporal locality - a program that references.
Chapter 5 Memory Hierarchy Design. 2 Many Levels in Memory Hierarchy Pipeline registers Register file 1st-level cache (on-chip) 2nd-level cache (on same.
Computer Structure Cache Memory
CMSC 611: Advanced Computer Architecture
CSE 351 Section 9 3/1/12.
Yu-Lun Kuo Computer Sciences and Information Engineering
CSC 4250 Computer Architectures
Multilevel Memories (Improving performance using alittle “cash”)
How will execution time grow with SIZE?
5.2 Eleven Advanced Optimizations of Cache Performance
Cache Memory Presentation I
Morgan Kaufmann Publishers Memory & Cache
Lecture 08: Memory Hierarchy Cache Performance
CPE 631 Lecture 05: Cache Design
CMSC 611: Advanced Computer Architecture
Morgan Kaufmann Publishers Memory Hierarchy: Cache Basics
EE108B Review Session #6 Daxia Ge Friday February 23rd, 2007
Siddhartha Chatterjee
Chapter Five Large and Fast: Exploiting Memory Hierarchy
Cache Memory Rabi Mahapatra
Cache Performance Improvements
Memory & Cache.
10/18: Lecture Topics Using spatial locality
Presentation transcript:

Computer Design 2007 – Caches 1 Dr. Lihu Rappoport Some of the slides were taken from Avi Mendelson, Randi Katz, Patterson, Gabriel Loh MAMAS – Computer Architecture Cache Memory

Computer Design 2007 – Caches 2 Processor – Memory Gap Processor-Memory Performance Gap: (grows 50% / year)

Computer Design 2007 – Caches 3 Memory Trade-Offs u Large (dense) memories are slow u Fast memories are small, expensive and consume high power u Goal: give the processor a feeling that it has a memory which is large (dense), fast, consumes low power, and cheap u Solution: a Hierarchy of memories Speed: Fastest Slowest Size: Smallest Biggest Cost: Highest Lowest Power: Highest Lowest L1 Cache CPU L2 Cache L3 Cache Memory (DRAM)

Computer Design 2007 – Caches 4 Why Hierarchy Works u Temporal Locality (Locality in Time):  If an item is referenced, it will tend to be referenced again soon  Example: code and variables in loops  Keep recently accessed data closer to the processor u Spatial Locality (Locality in Space):  If an item is referenced, nearby items tend to be referenced soon  Example: scanning an array  Move contiguous blocks closer to the processor u Locality + smaller HW is faster + Amdahl’s law  memory hierarchy

Computer Design 2007 – Caches 5 Memory Hierarchy: Terminology u For each memory level define the following  Hit: data appears in the memory level  Hit Rate: the fraction of accesses found in that level  Hit Time: time to access the memory level includes also the time to determine hit/miss  Miss: need to retrieve data from next level  Miss Rate = 1 - (Hit Rate)  Miss Penalty: Time to replace a block in the upper level + Time to deliver the block the processor u Average memory-access time = teffective = (Hit time  Hit Rate) + (Miss Time  Miss rate) = (Hit time  Hit Rate) + (Miss Time  (1- Hit rate))  If hit rate is close to 1, t effective is close to Hit time

Computer Design 2007 – Caches 6 Effective Memory Access Time u Cache – holds a subset of the memory  Hopefully – the subset being used now u Effective memory access time t effective = (t cache  Hit Rate) + (t mem  (1 – Hit rate)) t mem includes the time it takes to detect a cache miss u Example  Assume t cache = 10 nsec and t mem = 100 nsec Hit Ratet eff (nsec)  t mem /t cache goes up  more important that hit-rate closer to 1

Computer Design 2007 – Caches 7 Cache – Main Idea u The cache holds a small part of the entire memory  Need to map parts of the memory into the cache u Main memory is (logically) partitioned into blocks  Typical block size is 32 to 64 bytes  Blocks are aligned u Cache partitioned to cache lines  Each cache line holds a block  Only a subset of the blocks is mapped to the cache at a given time  The cache views an address as Block #offset memory cache

Computer Design 2007 – Caches 8 Cache Lookup u Cache hit  Block is mapped to the cache – return data according to block’s offset u Cache miss  Block is not mapped to the cache  do a cache line fill Fetch block into fill buffer may require few bus cycle Write fill buffer into cache  May need to evict another block from the cache Make room for the new block memory cache

Computer Design 2007 – Caches 9 Fully Associative Cache u An address is partitioned to  offset within block  block number u Each block may be mapped to each of the cache lines  Lookup block in all lines u Each cache line has a tag  All tags are compared to the block# in parallel  Need a comparator per line  If one of the tags matches the block#, we have a hit Supply data according to offset Tag Array Tag Tag = Block#Offset Address Fields 0431 Data array 031 Line = = = hitdata

Computer Design 2007 – Caches 10 Valid Bit u Initially cache is empty  Need to have a “line valid” indication – line valid bit u A line may also be invalidated Line Tag Array Tag Tag = Block#Offset Data array 031 = = = hitdata valid bit v

Computer Design 2007 – Caches 11 Direct Map Cache u #block l.s.bits map block to a specific cache line  A given block is mapped to a specific cache line Also called set  If two blocks are mapped to the same line, only one can reside in the cache u The rest of the #block bits are used as tag  Compared to the tag stored in the cache for the appropriate set Tag Array Tag Set# 0 31 TagSetOffset Address Line 5 Block number 2 9 =512 sets Data Array

Computer Design 2007 – Caches 12 Line Size: 16 bytes  5 Offset bits Cache Size: 16KB = 2 14 Bytes #lines = cache size / line size = 2 14 /2 5 =2 9 =512 #sets = #lines #set bits = 9 bits #Tag bits = 32 – (#set bits + #offset bits) = 32 – (9+5) = 18 bits Lookup Address: 0x Direct Map Cache – Example Tag SetOffset Address Fields Tag Array = Hit/Miss offset= 0x18 set= 0x0B3 set= 0x048B1

Computer Design 2007 – Caches 13 Direct Map Cache (cont) u Partition memory into slices  slice size = cache size u Partition each slice to blocks  Block size = cache line size  Distance of block from slice start indicates position in cache (set) u Advantages  Easy hit/miss resolution  Easy replacement algorithm  Lowest power u Disadvantage  Line replacements due to “set conflict misses” Cache Size x x x Mapped to set X Cache Size Cache Size

Computer Design 2007 – Caches 14 2-Way Set Associative Cache u Each set holds two line (way 0 and way 1)  Each block can be mapped into one of two lines in the appropriate set LineTag Line TagSetOffset Address Fields Cache storage Way 1 Tag Array Set# 031Way 0 Tag Array Set# 031Cache storage WAY #1WAY #0 Example: Line Size: 32 bytes Cache Size 16KB # of lines512 lines #sets256 Offset bits5 bits Set bits8 bits Tag bits19 bits Address 0x Offset: = 0x18 = 24 Set: = 0x0B3 = 179 Tag: = 0x091A2

Computer Design 2007 – Caches 15 2-Way Cache – Hit Decision TagSetOffset Way 0 Tag Set# Data = Hit/Miss MUX Data Out Data Tag Way 1 =

Computer Design 2007 – Caches 16 2-Way Set Associative Cache (cont) u Partition memory into slices  slice size = way size = ½ cache size u Partition each slice to blocks  Block size = cache line size  Distance of block from slice start indicates position in cache (set) u Compared to direct map cache  Half size slice  2× number of slices  2× number of blocks mapped to each set in the cache  But in each set we can have 2 blocks at a given time Way Size x x x Mapped to set X Way Size Way Size

Computer Design 2007 – Caches 17 Memory Update Policy on Writes u Write back  “Store” operations that hit the cache write only to the cache Main memory is not accessed in case of write hit Line is marked as modified or dirty  Modified cache line written to memory only when it is evicted Saves memory accesses when a line is updated many times On eviction, the entire line must be written to memory There is no indication which bytes within the line were modified u Write through  Stores that hit the cache write both to cache and to memory Need to write only the bytes that were changed (not entire line)  The ratio between reads and write is ~ 4:1 While writing to memory, the processor goes on reading from cache  No need to evict blocks from the cache (never dirty)  Use write buffers so that don’t wait for lower level memory

Computer Design 2007 – Caches 18 Write Buffer for Write Through u A Write Buffer between the Cache and Memory  Processor: writes data into the cache and the write buffer  Memory controller: write contents of the buffer to memory u Work ok if store frequency << 1/ DRAM write cycle  Otherwise store buffer overflows no matter how big it is The CPU Cycle Time <= DRAM Write Cycle Time u Write combining  combine writes in the write buffer u On cache miss need to lookup write buffer Processor Cache Write Buffer DRAM

Computer Design 2007 – Caches 19 What happens on a Cache miss? u On a read miss – perform a cache line fill  Fetch entire block that contains the missing data from memory  Block is fetched into the cache line fill buffer May take a few bus cycles to complete the fetch e.g., 64 bit (8 byte) data bus, 32 byte cache line  4 bus cycles Can stream the critical chunk into the core before the line fill ends  Once the entire block fetched it is moved into the cache u On a write miss  The processor is not waiting for data  continues its work  Option 1: Write allocate: fetch the line into the cache Goes with write back policy, assuming more writes are needed hoping that subsequent writes to the line hit the cache  Option 2: Write no allocate: do not fetch line into cache Goes with write through policy subsequent writes would update memory anyhow

Computer Design 2007 – Caches 20 Cache Replacement u Direct map  A new block is mapped to a single line in the cache  Old line is evicted (re-written to memory if needed) u N-way set associative cache  Choose a victim from all ways in the appropriate set u Replacement algorithms  Optimal replacement algorithm  FIFO – First In First Out  Random  LRU – Least Recently used u LRU is the best  but not that much better even than random

Computer Design 2007 – Caches 21 LRU Implementation u 2 ways  1 bit per set to mark latest way accessed in set  Evict way not pointed by bit u k-way set associative LRU  Requires full ordering of way accesses  Hold a log 2 k bit counter per line  When a way i is accessed X = Counter[i] Counter[i] = k for (j = 1 to k) if ((j  i) AND (Counter[j]>X)) Counter[j]--;  When replacement is needed evict way with counter = 0  Expensive for even small k’s Initial State Way Count Access way 2 Way Count Access way 0 Way Count

Computer Design 2007 – Caches 22 Pseudo LRU (PLRU) u PLRU records a partial order u Example: 4-ways, using 3 bits per-set:  Bit 0 specifies if LRU in {0,1} or on {2,3}  Bit 1 specifies the LRU between {0,1}  Bit 2 specifies the LRU between {2,3} u Victim selection  Following the opposite directions pointed by the bits u Example  Ways are accessed in the following order: 3,0,2,1 bit 0 =0 points to the pair with 1 bit 1 =1 points to 1 bit 2 =0 2 was accessed after 3  Victim: right, right  bit 0 bit 2 bit bit 0 bit 2 bit 1

Computer Design 2007 – Caches 23 Effect of Cache on Performance MPI = Miss per instruction = Mem. accesses per instruction × Miss rate Memory stall cycles = Memory accesses × Miss rate × Miss penalty = IC × MPI × Miss penalty CPU time = (CPU execution cycles + Memory stall cycles) × cycle time = IC × (CPI execution + MPI × Miss penalty) × cycle time

Computer Design 2007 – Caches 24 Cache Line Size u Larger line size takes advantage of spatial locality  Too big blocks: may fetch unused data, while possibly evicting useful date  miss rate goes up u Larger line size means larger miss penalty  Takes longer time to perform a cache line fill Using critical chunk first reduces the issue  Takes longer to evict (when using write back update policy) Ave. Access Time = hit time×(1– miss rate) + miss penalty × miss rate

Computer Design 2007 – Caches 25 Multi-ported Cache u N-ported cache enables n accesses in parallel  Parallelize cache access in different pipeline stages  Parallelize cache access in a super-scalar processors u Effectively doubles the cache die size u Possible solution: banked cache  Each line is divided to n banks  Can fetch data from k  n different banks in possibly different lines

Computer Design 2007 – Caches 26 Separate Code / Data Caches u Parallelize data access and instruction fetch u Code cache is a read only cache  No need to write back line into memory when evicted  Simpler to manage u What about self modifying code ?  Whenever executing a memory write  snoop code cache  If the code cache contains the written address Invalidate the line in which the address is contained  Code cache is accessed both in the fetch stage and in the memory access stage Code cache tags need to be dual ported to avoid stalling

Computer Design 2007 – Caches 27 L2 cache u L2 cache is bigger, but with higher latency  Reduces L1 miss penalty – saves access to memory  On modern processors L2 cache is located on-chip u Usually contains L1  All addresses in L1 are also contained in L2 Address evicted from L2  snoop invalidate it in L1  Data in L1 may be more updated than in L2 When evicting a modified line from L1  write to L2 When evicting a line from L2 which is modified in L1 Snoop invalidate to L1 generates a write from L1 to L2 Line marked as modified in L2  Line written to memory  Since L2 contains L1 it needs to be significantly larger e.g., if L2 is only 2× L1, half of L2 is duplicated in L1 u L2 is unified (code / data)

Computer Design 2007 – Caches 28 Core TM 2 Duo Die Photo L2 Cache

Computer Design 2007 – Caches 29 Classifying Misses: 3 Cs u Compulsory  First access to a block which is not in the cache the block must be brought into the cache  Cache size does not matter  Solution: prefetching u Capacity  cache cannot contain all blocks needed during program execution blocks are evicted and later retrieved  Solution: increase cache size, stream buffers u Conflict  Occurs in set associative or direct mapped caches when too many blocks are mapped to the same set  Solution: increase associativity, victim cache

Computer Design 2007 – Caches 30 Conflict 3Cs in SPEC92

Computer Design 2007 – Caches 31 Victim Cache u Per set load may be non-uniform  Some sets may have more conflict misses than others  Solution: allocate ways to sets dynamically u Victim cache gives a 2 nd chance to evicted lines  A line evicted from L1 cache is placed in the victim cache  If victim cache is full  evict its LRU line  On L1 cache lookup, lookup victim cache in parallel u On victim cache hit  Line is moved back to cache  Evicted line moved to the victim cache  Same access time as cache hit u Especially effective for direct mapped cache  Enables to combine the fast hit time of a direct mapped cache and still reduce conflict misses

Computer Design 2007 – Caches 32 Stream Buffers u Before inserting a new line into cache  Put new line in a stream buffer u If the line is expected to be accessed again  Move the line from the stream buffer into cache  E.g., if the line hits in the stream buffer u Example:  Scanning a very large array (much larger than the cache)  Each item in the array is accessed just once  If the array elements are inserted into the cache The entire cache will be thrashed  If we detect that this is just a scan-once operation E.g., using a hint from the software Can avoid putting the array lines into the cache

Computer Design 2007 – Caches 33 Prefetching u Instruction Prefetching  On a cache miss, prefetch sequential cache lines into stream buffers  Branch predictor directed prefetching Let branch predictor run ahead u Data Prefetching - predict future data accesses  Next sequential  Stride  General pattern u Software Prefetching  Special prefetching instructions that cannot cause faults u Prefetching relies on extra memory bandwidth  Otherwise it slows down demand fetches

Computer Design 2007 – Caches 34 Critical Word First u Reduce Miss Penalty u Don’t wait for full block to be loaded before restarting CPU  Early restart As soon as the requested word of the block arrives, send it to the CPU and let the CPU continue execution  Critical Word First Request the missed word first from memory and send it to the CPU as soon as it arrives Let the CPU continue execution while filling the rest of the words in the block Also called wrapped fetch and requested word first u Example: Pentium  64 bit = 8 byte bus, 32 byte cache line  4 bus cycles to fill line  Fetch date from 95H 80H-87H88H-8FH90H-97H98H-9FH 1432

Computer Design 2007 – Caches 35 Non-Blocking Cache u Hit Under Miss  Allow cache hits while one miss is in progress  Another miss has to wait  Relevant for an out-of-order execution CPU u Miss Under Miss, Hit Under Multiple Misses  Allow hits and misses when other misses in progress  Memory system must allow multiple pending requests  Manage a list of outstanding cache misses When miss is served and data gets back, update list

Computer Design 2007 – Caches 36 Compiler Optimizations: Merging Arrays u Merge 2 arrays into a single array of compound elements /* Before: two sequential arrays */ int val[SIZE]; int key[SIZE]; /* After: One array of structures */ struct merge { int val; int key; } merged_array[SIZE];  Reduce conflicts between val and key u Improves spatial locality

Computer Design 2007 – Caches 37 Compiler Optimizations: Loop Fusion u Combine 2 independent loops that have same looping and some variables overlap  Assume each element in a is 4 bytes, 32KB cache, 32 B / line for (i = 0; i < 10000; i++) a[i] = 1 / a[i]; for (i = 0; i < 10000; i++) sum = sum + a[i];  First loop: hit 7/8 of iterations  Second loop: array > cache  same hit rate as in 1 st loop u Fuse the loops for (i = 0; i < 10000; i++) { a[i] = 1 / a[i]; sum = sum + a[i]; }  First line: hit 7/8 of iterations  Second line: hit all

Computer Design 2007 – Caches 38 Compiler Optimizations: Loop Interchange u Change loops nesting to access data in order stored in memory u Two dimensional array in memory: x[0][0] x[0][1] … x[0][99] x[1][0] x[1][1] … /* Before */ for (j = 0; j < 100; j++) for (i = 0; i < 5000; i++) x[i][j] = 2 * x[i][j]; /* After */ for (i = 0; i < 5000; i++) for (j = 0; j < 100; j++) x[i][j] = 2 * x[i][j]; u Sequential accesses instead of striding through memory every 100 words  Improved spatial locality

Computer Design 2007 – Caches 39 Improving Cache Performance u Reduce cache miss rate  Larger cache  Reduce compulsory misses Larger Block Size HW Prefetching (Instr, Data) SW Prefetching (Data)  Reduce conflict misses Higher Associativity Victim Cache  Stream buffers Reduce cache thrashing  Compiler Optimizations u Reduce the miss penalty  Early Restart and Critical Word First on miss  Non-blocking Caches (Hit under Miss, Miss under Miss)  Second Level Cache u Reduce cache hit time  On-chip caches  Smaller size cache (hit time increases with cache size)  Direct map cache (hit time increases with associativity)

Computer Design 2007 – Caches 40 Backup

Computer Design 2007 – Caches 41 Cache Optimization Summary Miss Miss Hit Technique Rate Penalty Time Larger Block Size+– Higher Associativity+– Victim Caches+ Pseudo-Associative Caches + HW Prefetching of Instr/Data+ Compiler Controlled Prefetching+ Compiler Reduce Misses+ Priority to Read Misses+ Sub-block Placement ++ Early Restart & Critical Word 1st+ Non-Blocking Caches+ Second Level Caches+ miss rate miss penalty