Cache Definition Cache is pronounced cash. It is a temporary memory to store duplicate data that is originally stored elsewhere. Cache is used when the.

Slides:



Advertisements
Similar presentations
Lecture 19: Cache Basics Today’s topics: Out-of-order execution
Advertisements

1 Lecture 13: Cache and Virtual Memroy Review Cache optimization approaches, cache miss classification, Adapted from UCB CS252 S01.
1 Cache and Caching David Sands CS 147 Spring 08 Dr. Sin-Min Lee.
Cache Here we focus on cache improvements to support at least 1 instruction fetch and at least 1 data access per cycle – With a superscalar, we might need.
Caching and Virtual Memory. Main Points Cache concept – Hardware vs. software caches When caches work and when they don’t – Spatial/temporal locality.
Computer Organization CS224 Fall 2012 Lesson 44. Virtual Memory  Use main memory as a “cache” for secondary (disk) storage l Managed jointly by CPU hardware.
Lecture 34: Chapter 5 Today’s topic –Virtual Memories 1.
The Memory Hierarchy (Lectures #24) ECE 445 – Computer Organization The slides included herein were taken from the materials accompanying Computer Organization.
Spring 2003CSE P5481 Introduction Why memory subsystem design is important CPU speeds increase 55% per year DRAM speeds increase 3% per year rate of increase.
Overview of Cache and Virtual MemorySlide 1 The Need for a Cache (edited from notes with Behrooz Parhami’s Computer Architecture textbook) Cache memories.
Cache Memories September 30, 2008 Topics Generic cache memory organization Direct mapped caches Set associative caches Impact of caches on performance.
CSCE 212 Chapter 7 Memory Hierarchy Instructor: Jason D. Bakos.
Computer ArchitectureFall 2007 © November 21, 2007 Karem A. Sakallah Lecture 23 Virtual Memory (2) CS : Computer Architecture.
1 COMP 206: Computer Architecture and Implementation Montek Singh Mon, Oct 31, 2005 Topic: Memory Hierarchy Design (HP3 Ch. 5) (Caches, Main Memory and.
Technical University of Lodz Department of Microelectronics and Computer Science Elements of high performance microprocessor architecture Virtual memory.
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  1998 Morgan Kaufmann Publishers Chapter Seven Large and Fast: Exploiting Memory Hierarchy (Part II)
Cache Memories Effectiveness of cache is based on a property of computer programs called locality of reference Most of programs time is spent in loops.
COEN 180 Main Memory Cache Architectures. Basics Speed difference between cache and memory is small. Therefore:  Cache algorithms need to be implemented.
Memory Hierarchy and Cache Design The following sources are used for preparing these slides: Lecture 14 from the course Computer architecture ECE 201 by.
Systems I Locality and Caching
Cache Memory By Sean Hunter.
Maninder Kaur CACHE MEMORY 24-Nov
Caching and Virtual Memory. Main Points Cache concept – Hardware vs. software caches When caches work and when they don’t – Spatial/temporal locality.
Memory Systems Architecture and Hierarchical Memory Systems
Topics covered: Memory subsystem CSE243: Introduction to Computer Architecture and Hardware/Software Interface.
CMPE 421 Parallel Computer Architecture
Lecture 19: Virtual Memory
Memory Hierarchy and Cache Memory Jennifer Tsay CS 147 Section 3 October 8, 2009.
Lecture 10 Memory Hierarchy and Cache Design Computer Architecture COE 501.
The Memory Hierarchy 21/05/2009Lecture 32_CA&O_Engr Umbreen Sabir.
Chapter Twelve Memory Organization
Cache Control and Cache Coherence Protocols How to Manage State of Cache How to Keep Processors Reading the Correct Information.
Multilevel Memory Caches Prof. Sirer CS 316 Cornell University.
How to Build a CPU Cache COMP25212 – Lecture 2. Learning Objectives To understand: –how cache is logically structured –how cache operates CPU reads CPU.
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
1 Virtual Memory Main memory can act as a cache for the secondary storage (disk) Advantages: –illusion of having more physical memory –program relocation.
Lecture 08: Memory Hierarchy Cache Performance Kai Bu
Introduction: Memory Management 2 Ideally programmers want memory that is large fast non volatile Memory hierarchy small amount of fast, expensive memory.
Lecture#15. Cache Function The data that is stored within a cache might be values that have been computed earlier or duplicates of original values that.
Outline Cache writes DRAM configurations Performance Associative caches Multi-level caches.
COMP SYSTEM ARCHITECTURE HOW TO BUILD A CACHE Antoniu Pop COMP25212 – Lecture 2Jan/Feb 2015.
Multilevel Caches Microprocessors are getting faster and including a small high speed cache on the same chip.
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.
Chapter 9 Memory Organization By Nguyen Chau Topics Hierarchical memory systems Cache memory Associative memory Cache memory with associative mapping.
11 Intro to cache memory Kosarev Nikolay MIPT Nov, 2009.
Memory Hierarchy: Terminology Hit: data appears in some block in the upper level (example: Block X)  Hit Rate : the fraction of memory access found in.
1  2004 Morgan Kaufmann Publishers Chapter Seven Memory Hierarchy-3 by Patterson.
CS2100 Computer Organisation Virtual Memory – Own reading only (AY2015/6) Semester 1.
Additional Cache Notes Dan Nguyen Spring Lee.
CACHE MEMORY CS 147 October 2, 2008 Sampriya Chandra.
Chapter 11 System Performance Enhancement. Basic Operation of a Computer l Program is loaded into memory l Instruction is fetched from memory l Operands.
CMSC 611: Advanced Computer Architecture
Memory Hierarchy Ideal memory is fast, large, and inexpensive
Ramya Kandasamy CS 147 Section 3
Multilevel Memories (Improving performance using alittle “cash”)
Cache Memory Presentation I
Lecture 21: Memory Hierarchy
Cache Memories September 30, 2008
Lecture 23: Cache, Memory, Virtual Memory
ECE 445 – Computer Organization
Module IV Memory Organization.
Lecture 22: Cache Hierarchies, Memory
Morgan Kaufmann Publishers Memory Hierarchy: Virtual Memory
Lecture 21: Memory Hierarchy
Lecture 9: Caching and Demand-Paged Virtual Memory
Page Cache and Page Writeback
Presentation transcript:

Cache Definition Cache is pronounced cash. It is a temporary memory to store duplicate data that is originally stored elsewhere. Cache is used when the original data is expensive to fetch (due to longer access time) or to compute, compared to the cost of reading the cache.

Cache History: The term Cache was coined around 1967 by Lyle R. Johnson, the IBM Systems Journal editor. They were preparing a paper regarding an exciting memory improvement in Model 85. They needed a more descriptive term for “high-speed buffer” and Cache was coined.

Cache Functionality: The CPU and hard drive frequently use a cache, as do web browsers and web servers. Cache is made up of a pool of entries. Each entry has a data (datum), a copy of the datum in some backing store. Each entry also has a tag, which specifies the identity of the datum in the backing store of which the entry is a copy.

Cache Functionality (cont'd)

Cache Functionality (cont'd) Cache Hit When the cache client (a CPU, web browser, operating system) wishes to access a datum presumably in the backing store, it first checks the cache. If an entry can be found with a tag matching that of the desired datum, the datum in the entry is used instead. This situation is known as a cache hit.

Cache Functionality (cont'd) Cache Miss When the cache is consulted and found not to contain a datum with the desired tag, is known as a cache miss. The datum fetched from the backing store during miss handling is usually inserted into the cache, ready for the next access.

Cache Functionality: Replacement Policies If the cache has limited storage, it may have to eject some other entry in order to make room. The method used to select the entry to eject is known as the Replacement Policy. One popular replacement policy, least recently used (LRU), replaces the least recently used entry.

Cache Functionality: Replacement Policies More efficient caches compute use frequency against the size of the stored contents, as well as the latencies and throughputs for both the cache and the backing store.

Cache Functionality: Write Policies write-through cache, every write to the cache causes a synchronous write to the backing store. write-back cache, writes are not immediately syncronized to the original store. Instead, the cache tracks which of its locations have been written over, and are marked as dirty. The data in these locations is written back to the backing store when those data are evicted from the cache.

Cache Functionality: Write Policies No-write allocation is a cache policy where only processor reads are cached, thus avoiding the need for write-back or write- through when the old value of the datum was absent from the cache prior to the write.

Cache Applications CPU Caches Small memories on or close to the CPU chip can be made faster than the much larger main memory. PC might have up to 6 caches. Disk Cache The page cache which is a cache of disk pages in main memory, is usually managed by the operating system kernel or file system.

Cache Applications: Other Caches BIND DNS daemon caches a mapping of domain names to IP addresses Recently visited web pages can be managed by your web browser. Search engines also frequently make web pages they have indexed available from their cache. For example, Google provides a "Cached" link next to each search result.

Difference between Cache and Buffer A buffer is a temporary memory location, that is traditionally used because CPU instructions just cannot directly address data stored in peripheral devices. Cache's sole purpose is to reduce accesses to the underlying slower storage.

Cache Reference: Wikipedia: Accessed last on 10/16/2007http://en.wikipedia.org/wiki/Cache