Principles of Computer Architecture. Chapter 7: Memory

Similar documents
CPSC 352. Chapter 7: Memory. Computer Organization. Principles of Computer Architecture by M. Murdocca and V. Heuring

Computer Architecture and Organization

CMSC 313 Lecture 26 DigSim Assignment 3 Cache Memory Virtual Memory + Cache Memory I/O Architecture

Computer Organization (Autonomous)

Fig 7.30 The Cache Mapping Function. Memory Fields and Address Translation

The Memory System. Components of the Memory System. Problems with the Memory System. A Solution

Chapter Seven. Memories: Review. Exploiting Memory Hierarchy CACHE MEMORY AND VIRTUAL MEMORY

1. Creates the illusion of an address space much larger than the physical memory

Chapter 6 Objectives

Memory systems. Memory technology. Memory technology Memory hierarchy Virtual memory

MIPS) ( MUX

Chapter Seven. SRAM: value is stored on a pair of inverting gates very fast but takes up more space than DRAM (4 to 6 transistors)

Chapter 6 Memory 11/3/2015. Chapter 6 Objectives. 6.2 Types of Memory. 6.1 Introduction

Memory and multiprogramming

Structure of Computer Systems

Memory. Objectives. Introduction. 6.2 Types of Memory

Memory Organization MEMORY ORGANIZATION. Memory Hierarchy. Main Memory. Auxiliary Memory. Associative Memory. Cache Memory.

ADDRESS TRANSLATION AND TLB

CPE300: Digital System Architecture and Design

ADDRESS TRANSLATION AND TLB

Locality. CS429: Computer Organization and Architecture. Locality Example 2. Locality Example

Virtual Memory. Patterson & Hennessey Chapter 5 ELEC 5200/6200 1

Lecture 2: Memory Systems

Com S 321 Problem Set 3

CHAPTER 6 Memory. CMPS375 Class Notes (Chap06) Page 1 / 20 Dr. Kuo-pao Yang

Pipelined processors and Hazards

Virtual Memory Virtual memory first used to relive programmers from the burden of managing overlays.

CS356: Discussion #9 Memory Hierarchy and Caches. Marco Paolieri Illustrations from CS:APP3e textbook

CPU issues address (and data for write) Memory returns data (or acknowledgment for write)

Chapter 6 Caches. Computer System. Alpha Chip Photo. Topics. Memory Hierarchy Locality of Reference SRAM Caches Direct Mapped Associative

Topics in Memory Subsystem

Chapter 8: Memory Management. Background Swapping Contiguous Allocation Paging Segmentation Segmentation with Paging

Chapter 4 Main Memory

Characteristics of Memory Location wrt Motherboard. CSCI 4717 Computer Architecture. Characteristics of Memory Capacity Addressable Units

UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering. Computer Architecture ECE 568/668

A Review on Cache Memory with Multiprocessor System

CHAPTER 6 Memory. CMPS375 Class Notes Page 1/ 16 by Kuo-pao Yang

Contents. Memory System Overview Cache Memory. Internal Memory. Virtual Memory. Memory Hierarchy. Registers In CPU Internal or Main memory

Improving Cache Performance and Memory Management: From Absolute Addresses to Demand Paging. Highly-Associative Caches

CPSC 330 Computer Organization

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 27, FALL 2012

Memory Design. Cache Memory. Processor operates much faster than the main memory can.

Cache memories are small, fast SRAM-based memories managed automatically in hardware. Hold frequently accessed blocks of main memory

EE414 Embedded Systems Ch 5. Memory Part 2/2

Chapter Seven. Large & Fast: Exploring Memory Hierarchy

ECE232: Hardware Organization and Design

CPE300: Digital System Architecture and Design

Chapter 2: Memory Hierarchy Design, part 1 - Introducation. Advanced Computer Architecture Mehran Rezaei

Memory Hierarchy. Goal: Fast, unlimited storage at a reasonable cost per bit.

Chap. 12 Memory Organization

a process may be swapped in and out of main memory such that it occupies different regions

Mismatch of CPU and MM Speeds

ECE468 Computer Organization and Architecture. Virtual Memory

ECE4680 Computer Organization and Architecture. Virtual Memory

Eastern Mediterranean University School of Computing and Technology CACHE MEMORY. Computer memory is organized into a hierarchy.

We r e going to play Final (exam) Jeopardy! "Answers:" "Questions:" - 1 -

Design with Microprocessors

Large and Fast: Exploiting Memory Hierarchy

CS 33. Architecture and Optimization (3) CS33 Intro to Computer Systems XVI 1 Copyright 2018 Thomas W. Doeppner. All rights reserved.

CMPSC 311- Introduction to Systems Programming Module: Caching

Computer Organization and Structure. Bing-Yu Chen National Taiwan University

ECE 485/585 Microprocessor System Design

Contents. Main Memory Memory access time Memory cycle time. Types of Memory Unit RAM ROM

A Cache Hierarchy in a Computer System

Cache memory. Lecture 4. Principles, structure, mapping

COMPUTER ARCHITECTURE AND ORGANIZATION

Chapter 7: Large and Fast: Exploiting Memory Hierarchy

NEXT SET OF SLIDES FROM DENNIS FREY S FALL 2011 CMSC313.

EN1640: Design of Computing Systems Topic 06: Memory System

The check bits are in bit numbers 8, 4, 2, and 1.

Lecture-14 (Memory Hierarchy) CS422-Spring

Memory Hierarchy. Mehran Rezaei

Virtual Memory. Yannis Smaragdakis, U. Athens

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 27, SPRING 2013

EN1640: Design of Computing Systems Topic 06: Memory System

Altera FLEX 8000 Block Diagram

Cache Memory COE 403. Computer Architecture Prof. Muhamed Mudawar. Computer Engineering Department King Fahd University of Petroleum and Minerals

CMSC 313 Lecture 13 Project 4 Questions Reminder: Midterm Exam next Thursday 10/16 Virtual Memory

ECE 341. Lecture # 18

Chapter 8. Virtual Memory

Chapter 5B. Large and Fast: Exploiting Memory Hierarchy

V. Primary & Secondary Memory!

CS 61C: Great Ideas in Computer Architecture. The Memory Hierarchy, Fully Associative Caches

Chapter 2: Memory Hierarchy Design (Part 3) Introduction Caches Main Memory (Section 2.2) Virtual Memory (Section 2.4, Appendix B.4, B.

Processes and Tasks What comprises the state of a running program (a process or task)?

CS152 Computer Architecture and Engineering

Memory Hierarchy. Slides contents from:

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2014 Lecture 14

Chapter 7- Memory System Design

CS153: Final Review1. Chengyu Song. Slides modified from Harsha Madhyvasta, Nael Abu-Ghazaleh, and Zhiyun Qian

Memory. From Chapter 3 of High Performance Computing. c R. Leduc

Background. Memory Hierarchies. Register File. Background. Forecast Memory (B5) Motivation for memory hierarchy Cache ECC Virtual memory.

A cache is a small, fast memory which is transparent to the processor. The cache duplicates information that is in main memory.

Memory Hierarchy Y. K. Malaiya

Digital Logic & Computer Design CS Professor Dan Moldovan Spring Copyright 2007 Elsevier 8-<1>

CSCI-UA.0201 Computer Systems Organization Memory Hierarchy

Physical characteristics (such as packaging, volatility, and erasability Organization.

Virtual Memory. Chapter 8

Memory Management Virtual Memory

DAT (cont d) Assume a page size of 256 bytes. physical addresses. Note: Virtual address (page #) is not stored, but is used as an index into the table

Transcription:

7-1 Chapter 7 - Memory Principles of Computer Architecture Miles Murdocca and Vincent Heuring Chapter 7: Memory

7-2 Chapter 7 - Memory Chapter Contents 7.1 The Memory Hierarchy 7.2 Random Access Memory 7.3 Chip Organization 7.4 Commercial Memory Modules 7.5 Read-Only Memory 7.6 Cache Memory 7.7 Virtual Memory 7.8 Advanced Topics 7.9 Case Study: Rambus Memory 7.10 Case Study: The Intel Pentium Memory System

7-3 Chapter 7 - Memory The Memory Hierarchy

7-4 Chapter 7 - Memory Functional Behavior of a RAM Cell

7-5 Chapter 7 - Memory Simplified RAM Chip Pinout

7-6 Chapter 7 - Memory A Four-Word Memory with Four Bits per Word in a 2D Organization

7-7 Chapter 7 - Memory A Simplified Representation of the Four-Word by Four-Bit RAM

7-8 Chapter 7 - Memory 2-1/2D Organization of a 64-Word by One-Bit RAM

7-9 Chapter 7 - Memory Two Four-Word by Four-Bit RAMs are Used in Creating a Four-Word by Eight-Bit RAM

7-10 Chapter 7 - Memory Two Four-Word by Four-Bit RAMs Make up an Eight-Word by Four-Bit RAM

7-11 Chapter 7 - Memory Single-In-Line Memory Module Adapted from(texas Instruments, MOS Memory: Commercial and Military Specifications Data Book, Texas Instruments, Literature Response Center, P.O. Box 172228, Denver, Colorado, 1991.)

7-12 Chapter 7 - Memory A ROM Stores Four Four-Bit Words

7-13 Chapter 7 - Memory A Lookup Table (LUT) Implements an Eight-Bit ALU

7-14 Chapter 7 - Memory Placement of Cache in a Computer System The locality principle: a recently referenced memory location is likely to be referenced again (temporal locality); a neighbor of a recently referenced memory location is likely to be referenced (spatial locality).

7-15 Chapter 7 - Memory An Associative Mapping Scheme for a Cache Memory

7-16 Chapter 7 - Memory Associative Mapping Example Consider how an access to memory location (A035F014) 16 is mapped to the cache for a 2 32 word memory. The memory is divided into 2 27 blocks of 2 5 = 32 words per block, and the cache consists of 2 14 slots: If the addressed word is in the cache, it will be found in word (14) 16 of a slot that has tag (501AF80) 16, which is made up of the 27 most significant bits of the address. If the addressed word is not in the cache, then the block corresponding to tag field (501AF80) 16 is brought into an available slot in the cache from the main memory, and the memory reference is then satisfied from the cache.

7-17 Chapter 7 - Memory Replacement Policies When there are no available slots in which to place a block, a replacement policy is implemented. The replacement policy governs the choice of which slot is freed up for the new block. Replacement policies are used for associative and setassociative mapping schemes, and also for virtual memory. Least recently used (LRU) First-in/first-out (FIFO) Least frequently used (LFU) Random Optimal (used for analysis only look backward in time and reverse-engineer the best possible strategy for a particular sequence of memory references.)

7-18 Chapter 7 - Memory A Direct Mapping Scheme for Cache Memory

7-19 Chapter 7 - Memory Direct Mapping Example For a direct mapped cache, each main memory block can be mapped to only one slot, but each slot can receive more than one block. Consider how an access to memory location (A035F014) 16 is mapped to the cache for a 2 32 word memory. The memory is divided into 2 27 blocks of 2 5 = 32 words per block, and the cache consists of 2 14 slots: If the addressed word is in the cache, it will be found in word (14) 16 of slot (2F80) 16, which will have a tag of (1406) 16.

7-20 Chapter 7 - Memory A Set Associative Mapping Scheme for a Cache Memory

7-21 Chapter 7 - Memory Set-Associative Mapping Example Consider how an access to memory location (A035F014) 16 is mapped to the cache for a 2 32 word memory. The memory is divided into 2 27 blocks of 2 5 = 32 words per block, there are two blocks per set, and the cache consists of 2 14 slots: The leftmost 14 bits form the tag field, followed by 13 bits for the set field, followed by five bits for the word field:

7-22 Chapter 7 - Memory Cache Read and Write Policies

7-23 Chapter 7 - Memory Hit Ratios and Effective Access Times Hit ratio and effective access time for single level cache: Hit ratios and effective access time for multi-level cache:

7-24 Chapter 7 - Memory Direct Mapped Cache Example Compute hit ratio and effective access time for a program that executes from memory locations 48 to 95, and then loops 10 times from 15 to 31. The direct mapped cache has four 16- word slots, a hit time of 80 ns, and a miss time of 2500 ns. Loadthrough is used. The cache is initially empty.

7-25 Chapter 7 - Memory Table of Events for Example Program

7-26 Chapter 7 - Memory Calculation of Hit Ratio and Effective Access Time for Example Program

7-27 Chapter 7 - Memory Neat Little LRU Algorithm A sequence is shown for the Neat Little LRU Algorithm for a cache with four slots. Main memory blocks are accessed in the sequence: 0, 2, 3, 1, 5, 4.

7-28 Chapter 7 - Memory Overlays A partition graph for a program with a main routine and three subroutines:

7-29 Chapter 7 - Memory Virtual Memory Virtual memory is stored in a hard disk image. The physical memory holds a small number of virtual pages in physical page frames. A mapping between a virtual and a physical memory:

7-30 Chapter 7 - Memory Page Table The page table maps between virtual memory and physical memory.

7-31 Chapter 7 - Memory Using the Page Table A virtual address is translated into a physical address:

7-32 Chapter 7 - Memory Using the Page Table (cont ) The configuration of a page table changes as a program executes. Initially, the page table is empty. In the final configuration, four pages are in physical memory.

7-33 Chapter 7 - Memory Segmentation A segmented memory allows two users to share the same word processor code, with different data spaces:

7-34 Chapter 7 - Memory Fragmentation (a) Free area of memory after initialization; (b) after fragmentation; (c) after coalescing.

7-35 Chapter 7 - Memory Translation Lookaside Buffer An example TLB holds 8 entries for a system with 32 virtual pages and 16 page frames.

7-36 Chapter 7 - Memory 3-Variable Decoder A conventional decoder is not extensible to large sizes because each address line drives twice as many logic gates for each added address line.

7-37 Chapter 7 - Memory Tree Decoder - 3 Variables A tree decoder is more easily extended to large sizes because fan-in and fan-out are managed by adding deeper levels.

7-38 Chapter 7 - Memory Tree Decoding One Level at a Time A decoding tree for a 16-word random access memory:

7-39 Chapter 7 - Memory Content Addressable Memory Addressing Relationships between random access memory and content addressable memory:

7-40 Chapter 7 - Memory Overview of CAM Source: (Foster, C. C., Content Addressable Parallel Processors, Van Nostrand Reinhold Company, 1976.)

7-41 Chapter 7 - Memory Addressing Subtrees for a CAM

7-42 Chapter 7 - Memory Block Diagram of Dual-Read RAM

7-43 Chapter 7 - Memory Rambus Memory Rambus technology on the Nintendo 64 motherboard (top left and bottom right) enables cost savings over the conventional Sega Saturn motherboard design (bottom left). (Photo source: Rambus, Inc.)

7-44 Chapter 7 - Memory The Intel Pentium Memory System