Ramya Kandasamy CS 147 Section 3

Slides:



Advertisements
Similar presentations
1 Lecture 13: Cache and Virtual Memroy Review Cache optimization approaches, cache miss classification, Adapted from UCB CS252 S01.
Advertisements

1 Parallel Scientific Computing: Algorithms and Tools Lecture #2 APMA 2821A, Spring 2008 Instructors: George Em Karniadakis Leopold Grinberg.
CMPE 421 Parallel Computer Architecture MEMORY SYSTEM.
Recap. The Memory Hierarchy Increasing distance from the processor in access time L1$ L2$ Main Memory Secondary Memory Processor (Relative) size of the.
Memory Organization.
CS 524 (Wi 2003/04) - Asim LUMS 1 Cache Basics Adapted from a presentation by Beth Richardson
Virtual Memory By: Dinouje Fahih. Definition of Virtual Memory Virtual memory is a concept that, allows a computer and its operating system, to use a.
Systems I Locality and Caching
Memory Systems Architecture and Hierarchical Memory Systems
CMPE 421 Parallel Computer Architecture
CS1104: Computer Organisation School of Computing National University of Singapore.
Memory Hierarchy and Cache Memory Jennifer Tsay CS 147 Section 3 October 8, 2009.
IT253: Computer Organization
Chapter Twelve Memory Organization
Memory and cache CPU Memory I/O. CEG 320/52010: Memory and cache2 The Memory Hierarchy Registers Primary cache Secondary cache Main memory Magnetic disk.
What is cache memory?. Cache Cache is faster type of memory than is found in main memory. In other words, it takes less time to access something in cache.
Chapter 9 Memory Organization By Jack Chung. MEMORY? RAM?
3-May-2006cse cache © DW Johnson and University of Washington1 Cache Memory CSE 410, Spring 2006 Computer Systems
CSE 241 Computer Engineering (1) هندسة الحاسبات (1) Lecture #3 Ch. 6 Memory System Design Dr. Tamer Samy Gaafar Dept. of Computer & Systems Engineering.
CSE378 Intro to caches1 Memory Hierarchy Memory: hierarchy of components of various speeds and capacities Hierarchy driven by cost and performance In early.
Introduction: Memory Management 2 Ideally programmers want memory that is large fast non volatile Memory hierarchy small amount of fast, expensive memory.
A BRIEF INTRODUCTION TO CACHE LOCALITY YIN WEI DONG 14 SS.
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.
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 Chapter Seven CACHE MEMORY AND VIRTUAL MEMORY. 2 SRAM: –value is stored on a pair of inverting gates –very fast but takes up more space than DRAM (4.
Jeffrey Ellak CS 147. Topics What is memory hierarchy? What are the different types of memory? What is in charge of accessing memory?
Additional Cache Notes Dan Nguyen Spring Lee.
What is it and why do we need it? Chris Ward CS147 10/16/2008.
Hierarchical Memory Systems Prof. Sin-Min Lee Department of Computer Science.
COMPUTER SYSTEMS ARCHITECTURE A NETWORKING APPROACH CHAPTER 12 INTRODUCTION THE MEMORY HIERARCHY CS 147 Nathaniel Gilbert 1.
نظام المحاضرات الالكترونينظام المحاضرات الالكتروني Cache Memory.
Memory Management memory hierarchy programs exhibit locality of reference - non-uniform reference patterns temporal locality - a program that references.
Computer Architecture Lecture 25 Fasih ur Rehman.
Cache Advanced Higher.
CMSC 611: Advanced Computer Architecture
Memory Hierarchy Ideal memory is fast, large, and inexpensive
Computer Organization
Memory Management (2).
Cache Memory.
Memory COMPUTER ARCHITECTURE
Memory and cache CPU Memory I/O.
The Goal: illusion of large, fast, cheap memory
How will execution time grow with SIZE?
Swapping Segmented paging allows us to have non-contiguous allocations
Architecture Background
Cache Memory Presentation I
CACHE MEMORY.
Lecture 14 Virtual Memory and the Alpha Memory Hierarchy
Memory and cache CPU Memory I/O.
ECE 445 – Computer Organization
Lecture 29: Virtual Memory-Address Translation
Andy Wang Operating Systems COP 4610 / CGS 5765
Memory Hierarchy Memory: hierarchy of components of various speeds and capacities Hierarchy driven by cost and performance In early days Primary memory.
Caching Principles and Paging Performance
Chapter 6 Memory System Design
Chap. 12 Memory Organization
CMSC 611: Advanced Computer Architecture
Morgan Kaufmann Publishers Memory Hierarchy: Virtual Memory
Memory Organization.
Part V Memory System Design
Memory Operation and Performance
Caching Principles and Paging Performance
Contents Memory types & memory hierarchy Virtual memory (VM)
Chapter 1 Computer System Overview
Memory Hierarchy Memory: hierarchy of components of various speeds and capacities Hierarchy driven by cost and performance In early days Primary memory.
Fundamentals of Computing: Computer Architecture
Cache Memory and Performance
Sarah Diesburg Operating Systems CS 3430
Sarah Diesburg Operating Systems COP 4610
Presentation transcript:

Ramya Kandasamy CS 147 Section 3 Memory Hierarchy Ramya Kandasamy CS 147 Section 3

Memory Hierarchy Decreasing Cost, Decreasing Speed, Increasing Size Registers Level One Cache Level Two Cache Main Memory NUMA Virtual Memory File Storage Network Storage Near-Line Storage Off-Line Storage Hard Copy Increasing Cost, Speed, Decrease Size Decreasing Cost, Decreasing Speed, Increasing Size

Levels Continued -The top level CPU registers provide the fastest memory but also is the smallest memory object (with only 8 registers) -As the diagram shows, the more we move down the hierarchy, the slower and larger the memory objects get

Purpose of the Hierarchy Three questions which are asked when creating memory are: How fast How much How expensive The purpose of the hierarchy is to allow fast access to large amounts of memory at a reasonable cost

Locality Hierarchal memory makes use of locality to create an organized and efficient structure What is locality? Locality is the phenomenon, that the collection of the data locations referenced in a short period of time in a running computer, often consists of relatively well predictable clusters

Types of Locality Temporal locality Spatial locality Equidistant locality Branch locality

Cache Architecture Cache memory is memory that is very fast and is built into the CPU or located next to it on a chip It stores information based on the principles of locality and allows the computer to avoid the bottleneck caused by the system bus How does cache work to efficiently store data?

Cache Architecture Continued Cache can often be organized as a set of cache lines. For example, a cache of 8kb can be organized as 512 lines with 16 bytes each The idea behind cache is to have each line be attached to certain memory region. So for the above example, cache line #0 could correspond to addresses $10000..$1000F

Direct-Map One way that the lines can correspond to addresses is called direct-mapping Direct mapping essentially means that a block of main memory is always loaded into the same cache line in the cache.

Fully-Associate Cache Fully-Associative caches makes it so that the cache lines are not dependent on memory addresses Although this allows for great deal of flexibility, it can be expensive and slow down the memory process

Set-Associative Cache Set Associative Cache is much like a compromise We group together a few cache lines to create a set and a block in memory can map to any one of the lines of a specific set Thus, each block can only map to one set but can be in any of the lines

Cache Hit/Miss If an item is found in cache, it is called a hit If an item is not found, it is called a miss, and the information must be loaded from main memory There are three replacement algorithms we went over in class: -First in, First out -Least Recently Used -Least Frequently Used

Virtual Memory Virtual memory is not really physical memory It is a technique which gives programs the idea that it has working memory even if physically it may overflow to disk storage It makes programming large applications easier and efficiently uses real physical memory

How does Virtual Memory Work? Executable program is divided into pages, some of which are loaded into main memory, some loaded into disk area When program runs and requires an instruction not stored in memory, a page fault occurs The operating system then loads the next page from disk onto main memory (least used frames on main memory freed up)

Example So say you have loaded an operating system, web browser, word processor, and several other applications into RAM (or Random Access Memory) If RAM does not have enough space to hold all these applications (RAM usually has 32 megabytes or 64), virtual memory is put into play It takes the overflow pages and saves it onto disk and then room is made on the RAM

Acknowledgments Some of the sites I used for diagrams are: http://cs.gmu.edu/cne/modules/vm/green/defn.html http://en.wikipedia.org/wiki/Virtual_memory http://www.contact-lenses-sun-glasses-eye-glasses.com/ram_memory.htm