1 / 11

Exploiting the Memory Hierarchy

Exploiting the Memory Hierarchy. Chapter 7 P&H. Introduction. Desire is to have unlimited amounts of fast memory Can exploit locality of reference to appear to have lots of fast memory Two types of locality Temporal Locality Spatial Locality. Memory Hierarchy. Memory Hierarchy.

Download Presentation

Exploiting the Memory Hierarchy

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Exploiting the Memory Hierarchy Chapter 7 P&H

  2. Introduction • Desire is to have unlimited amounts of fast memory • Can exploit locality of reference to appear to have lots of fast memory • Two types of locality • Temporal Locality • Spatial Locality

  3. Memory Hierarchy

  4. Memory Hierarchy

  5. Memory Hierarchy • data only copied between two levels at a time • minimum unit is called a block • hit rate is fraction of memory accesses found in upper level • miss rate = (1 – hit rate) • hit time Time to access upper level • miss penality time to replace block in upper level with corresponding block from lower level

  6. Cache Basics • Caches first appear in early 1960’s • following cache has single word sized block • How do we know if the requested item is in the cache? • If it is where isit?

  7. Direct Mapped Cache • cache address = (block address) mod (No blocks in cache) No blocks in cache should be a power of two

  8. A d d r e s s ( s h o w i n g b i t p o s i t i o n s ) 3 1 3 0 1 3 1 2 1 1 2 1 0 B y t e o f f s e t 1 0 2 0 H i t D a t a T a g I n d e x I n d e x V a l i d T a g D a t a 0 1 2 1 0 2 1 1 0 2 2 1 0 2 3 2 0 3 2 Tagged Storage

  9. Example • How many bits in total are required for a direct mapped cache with 64 KB of Data and One word blocks, assuming a 32 bit address?

  10. Handling Misses • No Modifications required to our pipelined data-path to handle hits • On a miss a basic approach is to stall the entire data-path until the value is fetched • Separate controller used for the caches

  11. Example – Miss on Instruction Cache

More Related