Chapter 6 Objectives

Similar documents
Announcement. Computer Architecture (CSC-3501) Lecture 20 (08 April 2008) Chapter 6 Objectives. 6.1 Introduction. 6.

Memory. Objectives. Introduction. 6.2 Types of Memory

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

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

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

CS 265. Computer Architecture. Wei Lu, Ph.D., P.Eng.

MEMORY. Objectives. L10 Memory

Chapter 6 Objectives

Computer Systems and Networks. ECPE 170 Jeff Shafer University of the Pacific $$$ $$$ Cache Memory $$$

Computer Organization and Assembly Language (CS-506)

Memory memories memory

Chapter 7 Large and Fast: Exploiting Memory Hierarchy. Memory Hierarchy. Locality. Memories: Review

Concept of Memory. The memory of computer is broadly categories into two categories:

Logic and Computer Design Fundamentals. Chapter 8 Memory Basics

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

The University of Adelaide, School of Computer Science 13 September 2018

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

Lecture 18: Memory Systems. Spring 2018 Jason Tang

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

Organization. 5.1 Semiconductor Main Memory. William Stallings Computer Organization and Architecture 6th Edition

William Stallings Computer Organization and Architecture 6th Edition. Chapter 5 Internal Memory

Internal Memory. Computer Architecture. Outline. Memory Hierarchy. Semiconductor Memory Types. Copyright 2000 N. AYDIN. All rights reserved.

Chapter Seven. Large & Fast: Exploring Memory Hierarchy

Computer Organization. Chapter 12: Memory organization

Module 5a: Introduction To Memory System (MAIN MEMORY)

Design and Implementation of an AHB SRAM Memory Controller

Recap: Machine Organization

Cycle Time for Non-pipelined & Pipelined processors

CPS101 Computer Organization and Programming Lecture 13: The Memory System. Outline of Today s Lecture. The Big Picture: Where are We Now?

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

Chapter 5 Internal Memory

ECE232: Hardware Organization and Design

Memory hierarchy and cache

INTRODUCTION TO INFORMATION & COMMUNICATION TECHNOLOGY (ICT) LECTURE 2 : WEEK 2 CSC-111-T

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

Sir Sadiq s computer notes for class IX. Chapter no 4. Storage Devices

CS 201 The Memory Hierarchy. Gerson Robboy Portland State University

+ Random-Access Memory (RAM)

Memory Hierarchy. Memory Flavors Principle of Locality Program Traces Memory Hierarchies Associativity. (Study Chapter 5)


5 Computer Organization

CREATED BY M BILAL & Arslan Ahmad Shaad Visit:

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

Computer Architecture A Quantitative Approach, Fifth Edition. Chapter 2. Memory Hierarchy Design. Copyright 2012, Elsevier Inc. All rights reserved.

Operating system Dr. Shroouq J.

EECS 3201: Digital Logic Design Lecture 7. Ihab Amer, PhD, SMIEEE, P.Eng.

Computer Organization. 8th Edition. Chapter 5 Internal Memory

Chapter 6 Objectives

Copyright 2012, Elsevier Inc. All rights reserved.

Computer Architecture. A Quantitative Approach, Fifth Edition. Chapter 2. Memory Hierarchy Design. Copyright 2012, Elsevier Inc. All rights reserved.

Memory Hierarchies. Instructor: Dmitri A. Gusev. Fall Lecture 10, October 8, CS 502: Computers and Communications Technology

ECE 152 Introduction to Computer Architecture

ECE468 Computer Organization and Architecture. Memory Hierarchy

Memories. Design of Digital Circuits 2017 Srdjan Capkun Onur Mutlu.

ECE 341. Lecture # 16

Memory Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Address Accessible Memories. A.R. Hurson Department of Computer Science Missouri University of Science & Technology

Large and Fast: Exploiting Memory Hierarchy

COSC 243. Memory and Storage Systems. Lecture 10 Memory and Storage Systems. COSC 243 (Computer Architecture)

Copyright 2012, Elsevier Inc. All rights reserved.

LECTURE 11. Memory Hierarchy

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

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

Memory hierarchy Outline

CS 261 Fall Mike Lam, Professor. Memory

Pharmacy college.. Assist.Prof. Dr. Abdullah A. Abdullah

1. Explain in detail memory classification.[summer-2016, Summer-2015]

Chapter 4 Main Memory

MEMORY BHARAT SCHOOL OF BANKING- VELLORE

CENG3420 Lecture 08: Memory Organization

Random-Access Memory (RAM) Systemprogrammering 2007 Föreläsning 4 Virtual Memory. Locality. The CPU-Memory Gap. Topics

Memory Hierarchy. Cache Memory. Virtual Memory

Memory Overview. Overview - Memory Types 2/17/16. Curtis Nelson Walla Walla University

CpE 442. Memory System

The Memory Hierarchy & Cache

Random-Access Memory (RAM) Systemprogrammering 2009 Föreläsning 4 Virtual Memory. Locality. The CPU-Memory Gap. Topics! The memory hierarchy

ECE Lab 8. Logic Design for a Direct-Mapped Cache. To understand the function and design of a direct-mapped memory cache.

7/28/ Prentice-Hall, Inc Prentice-Hall, Inc Prentice-Hall, Inc Prentice-Hall, Inc Prentice-Hall, Inc.

Donn Morrison Department of Computer Science. TDT4255 Memory hierarchies

CS152 Computer Architecture and Engineering Lecture 16: Memory System

machine cycle, the CPU: (a) Fetches an instruction, (b) Decodes the instruction, (c) Executes the instruction, and (d) Stores the result.

Random Access Memory (RAM)

Memory Hierarchy: Caches, Virtual Memory

Computer Organization: A Programmer's Perspective

,e-pg PATHSHALA- Computer Science Computer Architecture Module 25 Memory Hierarchy Design - Basics

k -bit address bus n-bit data bus Control lines ( R W, MFC, etc.)

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

Memory Hierarchy Y. K. Malaiya

Lecture 12: Memory hierarchy & caches

Basic Memory Hierarchy Principles. Appendix C (Not all will be covered by the lecture; studying the textbook is recommended!)

Embedded Systems Design: A Unified Hardware/Software Introduction. Outline. Chapter 5 Memory. Introduction. Memory: basic concepts

Embedded Systems Design: A Unified Hardware/Software Introduction. Chapter 5 Memory. Outline. Introduction

Lecture-14 (Memory Hierarchy) CS422-Spring

CENG4480 Lecture 09: Memory 1

Welcome to Part 3: Memory Systems and I/O

EI338: Computer Systems and Engineering (Computer Architecture & Operating Systems)

COMP2121: Microprocessors and Interfacing. Introduction to Microprocessors

CS 31: Intro to Systems Storage and Memory. Kevin Webb Swarthmore College March 17, 2015

Lecture-7 Characteristics of Memory: In the broad sense, a microcomputer memory system can be logically divided into three groups: 1) Processor

Memory classification:- Topics covered:- types,organization and working

Transcription:

Chapter 6 Memory

Chapter 6 Objectives Basic memory concepts, such as RAM and the various memory devices Master the concepts of hierarchical memory organization. Understand how each level of memory contributes to system performance. Concepts of cache memory and virtual memory, memory segmentation, paging and address translation. 2

6.1 Introduction Memory lies at the heart of the stored-program computer. In previous chapters, we studied the components from which memory is built and the ways in which memory is accessed by various ISAs. In this chapter, we focus on memory organization. A clear understanding of these ideas is essential for the analysis of system performance. 3

6.2 Types of Memory There are two kinds of main memory: random access memory, RAM, and read-only-memory, ROM. There are two types of RAM: dynamic RAM (DRAM) and static RAM (SRAM). Dynamic RAM consists of capacitors that slowly leak their charge over time. Thus they must be refreshed every few milliseconds to prevent data loss. DRAM is cheap memory owing to its simple design. 4

6.2 Types of Memory SRAM consists of circuits similar to the D flip-flop that we studied in Chapter 3. SRAM is very fast memory: it doesn t need to be refreshed like DRAM does. It is used to build cache memory, which we will discuss in detail later. ROM also does not need to be refreshed, either. In fact, it needs very little charge to retain its memory. ROM is used to store permanent, or semipermanent data that persists even while the system is turned off. 5

6.3 The Memory Hierarchy Generally speaking, faster memory is more expensive than slower memory. To provide the best performance at the lowest cost, memory is organized in a hierarchical fashion. Small, fast storage elements are kept in the CPU, larger, slower main memory is accessed through the data bus. Larger, (almost) permanent storage in the form of disk and tape drives is still further from the CPU. 6

6.3 The Memory Hierarchy This storage organization can be thought of as a pyramid: 7

6.3 The Memory Hierarchy To access a particular piece of data, the CPU first sends a request to its nearest memory, usually cache. If the data is not in cache, then main memory is queried. If the data is not in main memory, then the request goes to disk. Once the data is located, then the data, and a number of its nearby data elements are fetched into cache memory. 8

6.4 Cache Memory The purpose of cache memory is to speed up accesses by storing recently used data closer to the CPU, instead of storing it in main memory. Although cache is much smaller than main memory, its access time is a fraction of that of main memory. Unlike main memory, which is accessed by address, cache is typically accessed by content; hence, it is often called content addressable memory. Because of this, a single large cache memory isn t always desirable-- it takes longer to search. 9

6.4 Cache Memory The content that is addressed in content addressable cache memory is a subset of the bits of a main memory address called a field. The fields into which a memory address is divided provide a many-to-one mapping between larger main memory and the smaller cache memory. Many blocks of main memory map to a single block of cache. A tag field in the cache block distinguishes one cached memory block from another. 10

6.4 Cache Memory The simplest cache mapping scheme is direct mapped cache. In a direct mapped cache consisting of N blocks of cache, block X of main memory maps to cache block Y = X mod N. Thus, if we have 10 blocks of cache, block 7 of cache may hold blocks 7, 17, 27, 37,... of main memory. Once a block of memory is copied into its slot in cache, a valid bit is set for the cache block to let the system know that the block contains valid data. What could happen if there were no valid bit? 11

6.5 Virtual Memory Cache memory enhances performance by providing faster memory access speed. Virtual memory enhances performance by providing greater memory capacity, without the expense of adding main memory. Instead, a portion of a disk drive serves as an extension of main memory. If a system uses paging, virtual memory partitions main memory into individually managed page frames, that are written (or paged) to disk when they are not immediately needed. 12

6.5 Virtual Memory A physical address is the actual memory address of physical memory. Programs create virtual addresses that are mapped to physical addresses by the memory manager. Page faults occur when a logical address requires that a page be brought in from disk. 13

6.6 A Real-World Example Pentium architecture 14