DOC PREVIEW
Berkeley COMPSCI 61C - Lecture 16

This preview shows page 1-2-14-15-29-30 out of 30 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 30 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 30 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 30 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 30 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 30 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 30 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 30 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CS61C Memory Hierarchy Introduction and Eight Week Review Lecture 16Review 1/1OutlineHierarchy Analogy: Term Paper in LibraryHierarcgy Analogy: LibraryTechnology TrendsWho Cares About the Memory Hierarchy?The Goal: Illusion of large, fast, cheap memoryWhy Hierarchy works: Natural LocalityMemory Hierarchy: How Does it Work?Memory Hierarchy PyramidBig Idea of Memory HierarchyMemory Hierarchy: TerminologySlide 14Current Memory HierarchyMemory Hierarchy TechnologyHow is the hierarchy managed?AdministriviaAdministrivia Warnings“Computers in the News”From First Lecture; How much so far?Principle of abstraction, systems as layersCompilation v. interpretation to move downPliable Data: a program determines what it isStored program concept: instructions as dataPrinciple of LocalityGreater performance by exploiting parallelismPerformance measurement Principles/PitfallsRapid Change AND Little Change“And in Conclusion ...”cs 61C L16 Review.1Patterson Spring 99 ©UCBCS61C Memory Hierarchy Introduction and Eight Week Review Lecture 16March 12, 1999Dave Patterson (http.cs.berkeley.edu/~patterson)www-inst.eecs.berkeley.edu/~cs61c/schedule.htmlcs 61C L16 Review.2Patterson Spring 99 ©UCBReview 1/1°Magnetic Disks continue rapid advance: 60%/yr capacity, 40%/yr bandwidth, slow on seek, rotation improvements, MB/$ improving 100%/yr?•Designs to fit high volume form factor•Quoted seek times too conservative, data rates too optimistic for use in system°RAID •Higher performance with more disk arms per $•Adds availability option at modest costcs 61C L16 Review.3Patterson Spring 99 ©UCBOutline°Memory Hierarchy Analogy°Illusion of Large, Fast, Cheap Memory°Principle of Locality°Terms°Who manages each level of Hierarchy?°Administrivia, “Computer in the News”°Big Ideas on 61C: What we’ve seen so far°Conclusioncs 61C L16 Review.4Patterson Spring 99 ©UCBHierarchy Analogy: Term Paper in Library°Working on paper in library at a desk°Option 1: Every time need a book•Leave desk to go to shelves (or stacks)•Find the book•Bring one book back to desk•Read section interested in•When done with section, leave desk and go to shelves carrying book•Put the book back on shelf•Return to desk to work•Next time need a book, go to first stepcs 61C L16 Review.5Patterson Spring 99 ©UCBHierarcgy Analogy: Library°Option 2: Every time need a book•Leave some books on desk after fetching them•Only go to shelves when need a new book•When go to shelves, bring back related books in case you need them; sometimes you’ll need to return books not used recently to make space for new books on desk•Return to desk to work•When done, replace books on shelves, carrying as many as you can per trip°Illusion: whole library on your desktopcs 61C L16 Review.6Patterson Spring 99 ©UCBTechnology Trends DRAMYear Size Cycle Time1980 64 Kb 250 ns1983 256 Kb 220 ns1986 1 Mb 190 ns1989 4 Mb 165 ns1993 16 Mb 145 ns1997 64 Mb 120 ns CapacitySpeed (latency)Processor -- 4x in 3 yrs DRAM: 4x in 3 yrs 2x in 10 yrsDisk: 4x in 3 yrs 2x in 10 yrs1000:1! 2:1!cs 61C L16 Review.7Patterson Spring 99 ©UCBWho Cares About the Memory Hierarchy?µProc60%/yr.(2X/1.5yr)DRAM9%/yr.(2X/10 yrs)110100100019801981198319841985198619871988198919901991199219931994199519961997199819992000DRAMCPU1982Processor-MemoryPerformance Gap:(grows 50% / year)PerformanceTimeProcessor-DRAM Memory Gap (latency)cs 61C L16 Review.8Patterson Spring 99 ©UCBThe Goal: Illusion of large, fast, cheap memory°Fact: Large memories are slow, fast memories are small°How do we create a memory that is large, cheap and fast (most of the time)?°Hierarchy of Levels•Similar to Principle of Abstraction: hide details of multiple levelscs 61C L16 Review.9Patterson Spring 99 ©UCBWhy Hierarchy works: Natural Locality°The Principle of Locality:•Program access a relatively small portion of the address space at any instant of time.Address Space0 2^n - 1Probabilityof reference°What programming constructs lead to Principle of Locality?cs 61C L16 Review.10Patterson Spring 99 ©UCBMemory Hierarchy: How Does it Work?°Temporal Locality (Locality in Time): Keep most recently accessed data items closer to the processor•Library Analogy: Recently read books are kept on desk•Block is unit of transfer (like book)°Spatial Locality (Locality in Space): Move blocks consists of contiguous words to the upper levels •Library Analogy: Bring back nearby books on shelves when fetch a book; hope that you might need it later for your papercs 61C L16 Review.11Patterson Spring 99 ©UCBMemory Hierarchy PyramidLevels in memory hierarchyCentral Processor Unit (CPU)Size of memory at each levelLevel 1Level 2Level nIncreasing Distance from CPU,Decreasing cost / MB“Upper”“Lower”Level 3. . .(data cannot be in level i unless also in i+1)cs 61C L16 Review.12Patterson Spring 99 ©UCBBig Idea of Memory Hierarchy°Temporal locality: keep recently accessed data items closer to processor°Spatial locality: moving contiguous words in memory to upper levels of hierarchy°Uses smaller and faster memory technologies close to the processor •Fast hit time in highest level of hierarchy•Cheap, slow memory furthest from processor°If hit rate is high enough, hierarchy has access time close to the highest (and fastest) level and size equal to the lowest (and largest) levelcs 61C L16 Review.13Patterson Spring 99 ©UCBMemory Hierarchy: Terminology°Hit: data appears in some block in the upper level (example: Block X) •Hit Rate: the fraction of memory access found in the upper level•Analogy: fraction of time find book on desk°Miss: data needs to be retrieve from a block in the lower level (Block Y)•Miss Rate = 1 - (Hit Rate)•Analogy: fraction of time must go to shelves for bookcs 61C L16 Review.14Patterson Spring 99 ©UCBMemory Hierarchy: Terminology°Hit Time: Time to access the upper level which consists of•Time to determine hit/miss +Memory access time •Analogy: time to find, pick up book from desk°Miss Penalty: Time to replace a block in the upper level + Time to deliver the block the processor•Analogy: time to go to shelves, find needed book, and return it to your desk, pick up°Note: Hit Time << Miss Penaltycs 61C L16 Review.15Patterson Spring 99 ©UCBCurrent Memory HierarchyControlDatapathProcessorRegsSecon-daryMem-oryL2CacheSpeed(ns): 0.5ns 2ns 6ns 100ns 10,000,000ns Size (MB): 0.0005 0.05 1-4


View Full Document

Berkeley COMPSCI 61C - Lecture 16

Documents in this Course
SIMD II

SIMD II

8 pages

Midterm

Midterm

7 pages

Lecture 7

Lecture 7

31 pages

Caches

Caches

7 pages

Lecture 9

Lecture 9

24 pages

Lecture 1

Lecture 1

28 pages

Lecture 2

Lecture 2

25 pages

VM II

VM II

4 pages

Midterm

Midterm

10 pages

Load more
Download Lecture 16
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture 16 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 16 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?