L16_cache - The Big Picture Computer Processor...

Info icon This preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Cache (1) Fall 2007 The Big Picture Processor (active) Computer Control (“brain”) Datapath (“brawn”) Memory (passive) (where programs, data live when running) Devices Input Output Keyboard, Mouse Display , Printer Disk, Network
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Cache (2) Fall 2007 Memory Hierarchy Processor holds data in register file (~100 Bytes) Registers accessed on nanosecond timescale Memory (we’ll call “main memory”) More capacity than registers (~Gbytes) Access time ~50-100 ns Hundreds of clock cycles per memory access?! Disk HUGE capacity (virtually limitless) VERY slow: runs ~milliseconds Storage in computer systems:
Image of page 2
Cache (3) Fall 2007 Motivation: Why We Use Caches (written $) µProc 60%/yr. DRAM 7%/yr. 1 10 100 1000 1980 1981 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 DRAM CPU 1982 Processor-Memory Performance Gap: (grows 50% / year) Performance 1989 first Intel CPU with cache on chip 1998 Pentium III has two levels of cache on chip
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Cache (4) Fall 2007 Memory Caching Mismatch between processor and memory speeds leads us to add a new level: a memory cache Implemented with same IC processing technology as the CPU (usually integrated on same chip): faster but more expensive than DRAM memory. Cache is a copy of a subset of main memory. Most processors have separate caches for instructions and data.
Image of page 4
Cache (5) Fall 2007 Memory Hierarchy Processor Size of memory at each level Increasing Distance from Proc., Decreasing speed Level 1 Level 2 Level n Level 3 . . . Higher Lower Levels in memory hierarchy As we move to deeper levels the latency goes up and price per bit goes down.
Image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Cache (6) Fall 2007 Memory Hierarchy If level closer to Processor, it is: smaller faster subset of lower levels (contains most recently used data) Lowest Level (usually disk) contains all available data (or does it go beyond the disk?) Memory Hierarchy presents the processor with the illusion of a very large very fast memory.
Image of page 6
Cache (7) Fall 2007 Memory Hierarchy Basis Cache contains copies of data in memory that are being used. Memory contains copies of data on disk that are being used. Caches work on the principles of temporal and spatial locality . Temporal Locality: if we use it now, chances are we’ll want to use it again soon. Spatial Locality: if we use a piece of memory, chances are we’ll use the neighboring pieces soon.
Image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Cache (8) Fall 2007 Caching Terminology When we try to read memory, 3 things can happen: 1. cache hit : cache block is valid and contains proper address, so read desired word 2. cache miss : nothing in cache in appropriate block, so fetch from memory 3. cache miss, block replacement : wrong data is in cache at appropriate block, so discard it and fetch desired data from memory (cache always copy)
Image of page 8
Cache (9) Fall 2007 Cache Design How do we organize cache?
Image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern