CMPE 421 Parallel Computer Architecture MEMORY SYSTEM.

Slides:



Advertisements
Similar presentations
1 COMP 206: Computer Architecture and Implementation Montek Singh Wed., Oct. 23, 2002 Topic: Memory Hierarchy Design (HP3 Ch. 5) (Caches, Main Memory and.
Advertisements

Computer System Organization Computer-system operation – One or more CPUs, device controllers connect through common bus providing access to shared memory.
55:035 Computer Architecture and Organization Lecture 7 155:035 Computer Architecture and Organization.
CMSC 611: Advanced Computer Architecture Cache Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material adapted from.
1 Recap: Memory Hierarchy. 2 Memory Hierarchy - the Big Picture Problem: memory is too slow and or too small Solution: memory hierarchy Fastest Slowest.
Cache Memory Locality of reference: It is observed that when a program refers to memory, the access to memory for data as well as code are confined to.
Memory Subsystem and Cache Adapted from lectures notes of Dr. Patterson and Dr. Kubiatowicz of UC Berkeley.
1 Lecture 20 – Caching and Virtual Memory  2004 Morgan Kaufmann Publishers Lecture 20 Caches and Virtual Memory.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Computer Organization Lecture 20 - Memory.
1 Chapter Seven Large and Fast: Exploiting Memory Hierarchy.
1 COMP 206: Computer Architecture and Implementation Montek Singh Mon, Oct 31, 2005 Topic: Memory Hierarchy Design (HP3 Ch. 5) (Caches, Main Memory and.
1 COMP 206: Computer Architecture and Implementation Montek Singh Mon., Nov. 3, 2003 Topic: Memory Hierarchy Design (HP3 Ch. 5) (Caches, Main Memory and.
331 Lec20.1Fall :332:331 Computer Architecture and Assembly Language Fall 2003 Week 13 Basics of Cache [Adapted from Dave Patterson’s UCB CS152.
CIS °The Five Classic Components of a Computer °Today’s Topics: Memory Hierarchy Cache Basics Cache Exercise (Many of this topic’s slides were.
ENGS 116 Lecture 121 Caches Vincent H. Berk Wednesday October 29 th, 2008 Reading for Friday: Sections C.1 – C.3 Article for Friday: Jouppi Reading for.
Memory Organization.
Computer ArchitectureFall 2007 © November 7th, 2007 Majd F. Sakr CS-447– Computer Architecture.
Caching I Andreas Klappenecker CPSC321 Computer Architecture.
Overview: Memory Memory Organization: General Issues (Hardware) –Objectives in Memory Design –Memory Types –Memory Hierarchies Memory Management (Software.
1  2004 Morgan Kaufmann Publishers Chapter Seven.
1 SRAM: –value is stored on a pair of inverting gates –very fast but takes up more space than DRAM (4 to 6 transistors) DRAM: –value is stored as a charge.
CS 524 (Wi 2003/04) - Asim LUMS 1 Cache Basics Adapted from a presentation by Beth Richardson
1 CSE SUNY New Paltz Chapter Seven Exploiting Memory Hierarchy.
DAP Spr.‘98 ©UCB 1 Lecture 11: Memory Hierarchy—Ways to Reduce Misses.
Systems I Locality and Caching
Virtual Memory.
Computer Orgnization Rabie A. Ramadan Lecture 7. Wired Control Unit What are the states of the following design:
CPE432 Chapter 5A.1Dr. W. Abu-Sufah, UJ Chapter 5A: Exploiting the Memory Hierarchy, Part 1 Adapted from Slides by Prof. Mary Jane Irwin, Penn State University.
CMPE 421 Parallel Computer Architecture
CS1104: Computer Organisation School of Computing National University of Singapore.
COEN/ELEN 180 Storage Systems Memory Hierarchy. We are therefore forced to recognize the possibility of constructing a hierarchy of memories, each of.
EECS 318 CAD Computer Aided Design LECTURE 10: Improving Memory Access: Direct and Spatial caches Instructor: Francis G. Wolff Case.
1 CSCI 2510 Computer Organization Memory System I Organization.
Lecture 10 Memory Hierarchy and Cache Design Computer Architecture COE 501.
Lecture 14 Memory Hierarchy and Cache Design Prof. Mike Schulte Computer Architecture ECE 201.
Lecture 19 Today’s topics Types of memory Memory hierarchy.
EEE-445 Review: Major Components of a Computer Processor Control Datapath Memory Devices Input Output Cache Main Memory Secondary Memory (Disk)
Chapter Twelve Memory Organization
King Fahd University of Petroleum and Minerals King Fahd University of Petroleum and Minerals Computer Engineering Department Computer Engineering Department.
EEL5708/Bölöni Lec 4.1 Fall 2004 September 10, 2004 Lotzi Bölöni EEL 5708 High Performance Computer Architecture Review: Memory Hierarchy.
CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson.
COEN 180 Memory Hierarchy. We are therefore forced to recognize the possibility of constructing a hierarchy of memories, each of which has greater capacity.
1010 Caching ENGR 3410 – Computer Architecture Mark L. Chang Fall 2006.
The 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.
CSE378 Intro to caches1 Memory Hierarchy Memory: hierarchy of components of various speeds and capacities Hierarchy driven by cost and performance In early.
Computer Organization & Programming
Introduction: Memory Management 2 Ideally programmers want memory that is large fast non volatile Memory hierarchy small amount of fast, expensive memory.
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.
1  1998 Morgan Kaufmann Publishers Chapter Seven.
Topics in Memory System Design 2016/2/5\course\cpeg323-07F\Topic7.ppt1.
Lecture 5: Memory Performance. Types of Memory Registers L1 cache L2 cache L3 cache Main Memory Local Secondary Storage (local disks) Remote Secondary.
Adapted from Computer Organization and Design, Patterson & Hennessy, UCB ECE232: Hardware Organization and Design Part 14: Memory Hierarchy Chapter 5 (4.
What is it and why do we need it? Chris Ward CS147 10/16/2008.
1 Chapter Seven. 2 SRAM: –value is stored on a pair of inverting gates –very fast but takes up more space than DRAM (4 to 6 transistors) DRAM: –value.
CACHE _View 9/30/ Memory Hierarchy To take advantage of locality principle, computer memory implemented as a memory hierarchy: multiple levels.
CMSC 611: Advanced Computer Architecture
Computer Organization
Yu-Lun Kuo Computer Sciences and Information Engineering
The Goal: illusion of large, fast, cheap memory
Ramya Kandasamy CS 147 Section 3
Exam 2 Review Two’s Complement Arithmetic Ripple carry ALU logic and performance Look-ahead techniques, performance and equations Basic multiplication.
Architecture Background
CACHE MEMORY.
Memory Hierarchy Memory: hierarchy of components of various speeds and capacities Hierarchy driven by cost and performance In early days Primary memory.
CMSC 611: Advanced Computer Architecture
EE108B Review Session #6 Daxia Ge Friday February 23rd, 2007
Morgan Kaufmann Publishers Memory Hierarchy: Introduction
Chapter Five Large and Fast: Exploiting Memory Hierarchy
Cache Memory and Performance
Presentation transcript:

CMPE 421 Parallel Computer Architecture MEMORY SYSTEM

2 Memory System Outline Memory Systems Basics –Memory Technologies DRAM vs SRAM –WHY Hierarchical? –Principle of locality CACHES –Mapping, –blocks, –write policy, –Replacement policy Virtual Memory –Paging –Improving address translation segmentation Unifying principles of memory hierarchy

Memory System PRIMARY TECHNOLOGIES used in building memory hierarchy Random Access: –“Random” is good: access time is the same for all locations  DRAM: Dynamic Random Access Memory High density, low power, cheap, but slow Dynamic: needs to be “refreshed” regularly  SRAM: Static Random Access Memory Low density, high power, expensive, fast Static: content will last “forever”(until lose power) Often used applications requiring high-speed access “Not-so-random” Access Technology: Access time varies from location to location and from time to time Examples: Disk, CDROM Sequential Access Technology: access time linear in location (e.g. Tape) The Main Memory: DRAMs Caches: SRAMs 3

Memory System 4 Memory hierarchy takes advantage of the principle of locality by implementing the memory of a computer Because of these differences in cost and access time, it is advantageous to build memory as a hierarchy of levels Standard cost / performance trade off o Inverse relationship between access time and cost

The problem on Memory The Von Neumann Bottleneck –Logic continues to get faster –Memory capacity is getting larger But memory is not getting faster as logic –How can we keep the CPU busy all of the time? –Many aspects of the computer are dependent on the memory performance 5

The problem on Memory Cost vs. Performance –Fast memory is expensive –Slow memory can significantly affect performance Design philosophy –Use a hybrid solution which uses aspects of both –Keep frequently used things in a small of amount of fast/expensive memory, called a cache –Place everything else in slower/inexpensive memory –Make the common case fast 6

Slide #7 The Solution Memory can be arranged as hierarchies The goal is to provide the illusion of lots of fast memory Control Datapath Memory Processor Memory Fastest Slowest Smallest Biggest Highest Lowest Speed: Size: Cost: As we away from the processor the levels takes progressively longer to access At any given time, data is copied between only 2 adjacent level Upper level (cache) the one closer to processor Lower level : one further away from the processor

Cache Levels Often refer to “upper” to refer to memory closer to the processor Use the term “lower” to refer to memory farther from the processor Control Secondary Storage (DISK) Processor Main Memory (DRAM) Second Level Cache (SDRAM) Registers Datapath On-Chip Cache Faster Slower Inexpensive Expensive Remote Secondary Storage distributed file systems

As we move from the higher to low level –At the Highest level (L0) are small number of fast CPU registers that can access in a single clock cycle –Next are one or more small to moderate-sized SRAM-based cache memories that can be accessed in a few CPU clock cycles Next are slow but enormous local disk 9 Cache Levels

Memory Hierarchy Suppose that you are writing term project about computer hardware history. You will need many book under your hand. To find exact information that you need, you should go back to shelves and look for an additional books once you have a good selection of books in front of you, you may spend most of your time just using the books on the desk without going back to the shelves Problem: How to access all books within small duration or accessing large memory that we can access as fast as a very small memory –So we should find a way to make it possible for us to fit al the library books on our desk and still find what you want quickly 10

Solution: Principle of Locality –Program access a relatively small portion of their address space at any instant of time, just as you accessed a very small portion of the library’s collection Temporal locality (Locality in time) –If an item is referenced “now” it will be tend to be referenced again in the near feature Spatial locality (locality in space) –If an item is referenced “now” other items with addresses close to it will be tended to be referenced soon 11 Memory Hierarchy

Ex1: If you recently brought a book to your desk to look at, you will probably need to look at it again soon (temporal locality) Ex2: When you brought out the book on early Electrical Computers, You also notice that there was another book shelved next to it about early mechanical computers –So books on same topic must be shelved together in the library to increase spatial locality 12

Principle of Locality 13 Why does code have locality? Look at the common structures and behaviors of program executions -Temporal locality Most programs contain loops, so instruction and data are likely to be accessed repeatedly, showing high amounts of temporal locality Keep more recently accessed data items closer to the processor -Spatial locality Since instructions are normally accessed sequentially, programs show high spatial locality Accesses to data also exhibit a natural spatial locality, e.g., elements of an array Move block consisting of multiple contiguous words in memory to upper levels of the hierarchy.

Programs and Locality Program tends to exhibit a great deal of locality in memory access –Array, structure/record access –Subroutines (instructions are near each other) –Local variables (counters, pointers, etc.) are often referenced memory many times Most programs contain loops, so instructions and data are likely to be accessed repeatedly, showing high amounts of temporal locality Since instructions are normally accessed sequentially, programs show high spatial locality Access to data (elements of array) exhibit a natural spatial locality Take the advantage of the principle of locality by implementing the memory of a computer as a memory hierarchy 14