1 / 10

COE 308

COE 308. Memory Hierarchy. Memory. Storage Area for Program and Data Programmers Always Want Unlimited Amount of Fast Memory Fast Memory is Expensive Solution: Create the Illusion of Unlimited Fast Memory. Illustrative Example. In the Library (Engineering or Math)

jdeboer
Download Presentation

COE 308

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. COE 308 Memory Hierarchy COE 308

  2. Memory Storage Area for Program and Data Programmers Always Want Unlimited Amount of Fast Memory Fast Memory is Expensive Solution: Create the Illusion of Unlimited Fast Memory COE 308

  3. Illustrative Example • In the Library (Engineering or Math) • Select a Collection of Books on the Subject • Establish a List of Machines to Cover • If a Machine is Not Covered Go and Look for the Book Student Writing Paper about Important Historical Development of Computer Hardware COE 308

  4. Information Access • Being in the Library and not Elsewhere • Having All the Selected Book on the Table and not Just One Book Saves Time of Constantly Going Back to Shelves to Look for Books • Good Selection of Books means: • Good Probability that Many of the Needed Topics are Found in the Books • No Need to Bring All the Library Books on the Table • Impossible: Table too Small for That • Virtually All Library is on the Table because that’s All what is needed from the Whole Library COE 308

  5. Principle Of Locality Programs Access a Relatively Small Portion of Their Address Space at any instant of time (Student Accesses a Very Small Portion Of Library) • Temporal Locality (Locality in Time): An item that is referenced now tends to be referenced again soon. • Spatial Locality (Locality in Space): A referenced item close neighbors tend to be also referenced soon. COE 308

  6. Locality in Programs an Data Locality in Programs Arises from Simple and Natural Program Structures • In Programs • Instructions are accessed sequentially • Loops are another reason why Instructions and Data are going to be accessed repeatedly • In Data • Accesses to Elements of Array or Record • Variable Definitions are localized by the programmer in the source code and so are they in memory COE 308

  7. Memory Technology Typical Access Time Price per Mbyte in 2005 Memory Technology SRAM 1-10 ns $70-$100 20-30 ns $0.20-$0.30 DRAM 1-10 ms $0.001-$0.002 Magnetic Disk • Faster = Smaller Capacity = Higher Cost • Slower = Bigger Capacity = Lower Cost COE 308

  8. Memory Hierarchy • Faster Memory Close to the Processor • Slower Memory below faster in Hierarchy Because of Differences in Cost and Speed, It is Advantageous to build the Memory as a Hierarchy CPU Speed Size Cost($/bit) Fastest Smallest Highest Memory Memory Memory Slowest Biggest Lowest COE 308

  9. Memory Hierarchy and Data • May Consist of Multiple Levels • Data copied at all levels • Data update is copied between two adjacent levels at a time. • Data found in upper level: hit • Data not found in upper level: miss • hit rate is the fraction of memory accesses that produced a hit • miss rate is the fraction of memory accesses which outcome was a miss • hit = (1- miss) COE 308

  10. Hits and Misses • Data found in upper level: hit • Data not found in upper level: miss • hit rate is the fraction of memory accesses that produced a hit • miss rate is the fraction of memory accesses which outcome was a miss • hit = (1- miss) • hit time: time needed to access upper level of memory • miss penalty: time needed to replace a block in the upper level with the corresponding block from the lower level COE 308

More Related