Computer Organization (Autonomous)

Similar documents
Chap. 12 Memory Organization

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

UNIT:4 MEMORY ORGANIZATION

Computer & Microprocessor Architecture HCA103

Characteristics. Microprocessor Design & Organisation HCA2102. Unit of Transfer. Location. Memory Hierarchy Diagram

Chapter 4 Main Memory

Overview IN this chapter we will study. William Stallings Computer Organization and Architecture 6th Edition

William Stallings Computer Organization and Architecture 8th Edition. Cache Memory

Unit 2. Chapter 4 Cache Memory

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

COMPUTER ARCHITECTURE AND ORGANIZATION

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

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

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

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

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

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

Chapter 6 Objectives

Computer Organization. Chapter 12: Memory organization

Structure of Computer Systems

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

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

WEEK 7. Chapter 4. Cache Memory Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Lecture 2: Memory Systems

(Advanced) Computer Organization & Architechture. Prof. Dr. Hasan Hüseyin BALIK (4 th Week)

MIPS) ( MUX

William Stallings Computer Organization and Architecture 10 th Edition Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Computer Organization

Chapter 4. Cache Memory. Yonsei University

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)

Computer Organization

Principles of Computer Architecture. Chapter 7: Memory

Computer Architecture and Organization

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

Memory hierarchy and cache

Cache memory. Lecture 4. Principles, structure, mapping

ADDRESS TRANSLATION AND TLB

Memory Hierarchy. Cache Memory. Virtual Memory

ADDRESS TRANSLATION AND TLB

Memory. Objectives. Introduction. 6.2 Types of Memory

CSE Computer Architecture I Fall 2011 Homework 07 Memory Hierarchies Assigned: November 8, 2011, Due: November 22, 2011, Total Points: 100

Advanced Memory Organizations

CPE300: Digital System Architecture and Design

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

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

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

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

Chapter Seven Morgan Kaufmann Publishers

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

Chapter 8. Virtual Memory

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

Locality. Cache. Direct Mapped Cache. Direct Mapped Cache

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

OPERATING SYSTEM. PREPARED BY : DHAVAL R. PATEL Page 1. Q.1 Explain Memory

The Memory Hierarchy & Cache

Lecture 17 Introduction to Memory Hierarchies" Why it s important " Fundamental lesson(s)" Suggested reading:" (HP Chapter

Question?! Processor comparison!

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

3. Which of the following is volatile? [ ] A) Bubble memory B) RAM C) ROM D) Magneticdisk

Internal Memory Cache Stallings: Ch 4, Ch 5 Key Characteristics Locality Cache Main Memory

Chapter 5. Large and Fast: Exploiting Memory Hierarchy

Chapter 7: Large and Fast: Exploiting Memory Hierarchy

UNIT-V MEMORY ORGANIZATION

Pipelined processors and Hazards

CENG3420 Lecture 08: Memory Organization

CHETTINAD COLLEGE OF ENGINEERING AND TECHNOLOGY COMPUTER ARCHITECURE- III YEAR EEE-6 TH SEMESTER 16 MARKS QUESTION BANK UNIT-1

LECTURE 12. Virtual Memory

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

COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. 5 th. Edition. Chapter 5. Large and Fast: Exploiting Memory Hierarchy

Memory Hierarchy: Motivation

Memory Hierarchy Recall the von Neumann bottleneck - single, relatively slow path between the CPU and main memory.

ECE 30 Introduction to Computer Engineering

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

Memory Hierarchy: The motivation

TK2123: COMPUTER ORGANISATION & ARCHITECTURE. CPU and Memory (2)

Mismatch of CPU and MM Speeds

MEMORY. Computer memory refers to the hardware device that are used to store and access data or programs on a temporary or permanent basis.

CSC 553 Operating Systems

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

Memory Hierarchy Computing Systems & Performance MSc Informatics Eng. Memory Hierarchy (most slides are borrowed)

The Memory Hierarchy & Cache Review of Memory Hierarchy & Cache Basics (from 350):

MEMORY. Objectives. L10 Memory

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

HY225 Lecture 12: DRAM and Virtual Memory

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

CSE Computer Architecture I Fall 2009 Homework 08 Pipelined Processors and Multi-core Programming Assigned: Due: Problem 1: (10 points)

Large and Fast: Exploiting Memory Hierarchy

Chapter 5A. Large and Fast: Exploiting Memory Hierarchy

Multilevel Memories. Joel Emer Computer Science and Artificial Intelligence Laboratory Massachusetts Institute of Technology

LECTURE 10: Improving Memory Access: Direct and Spatial caches

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

Let!s go back to a course goal... Let!s go back to a course goal... Question? Lecture 22 Introduction to Memory Hierarchies

Memory memories memory

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

EE 4683/5683: COMPUTER ARCHITECTURE

EE414 Embedded Systems Ch 5. Memory Part 2/2

Computer Architecture. Memory Hierarchy. Lynn Choi Korea University

ECE7995 Caching and Prefetching Techniques in Computer Systems. Lecture 8: Buffer Cache in Main Memory (I)

Memory Technology. Chapter 5. Principle of Locality. Chapter 5 Large and Fast: Exploiting Memory Hierarchy 1

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

Transcription:

2-7-27 Computer Organization (Autonomous) UNIT IV Sections - A & D SYLLABUS The Memory System: Memory Hierarchy, - RAM and ROM Chips, Memory Address Maps, Memory Connection to, Auxiliary Magnetic Disks, Magnetic Tape, Associative Memory Hardware Organization, Match Logic, Cache Memory Associative Mapping, Direct Mapping, Set- Associative Mapping, Writing into Cache, Virtual Memory Address Space and Memory Space, Address Mapping using Pages, Associative Memory Page Table, Page Replacement. Prepared by Anil Kumar Prathipati, Asst. Prof., Dept. of CSE. 2 INDEX Memory Organization 2-4 Memory Hierarchy Main Memory Auxiliary Memory Associative Memory Cache Memory Virtual Memory 3 The system can be characterized with Location: Where it can be located, Processor, Internal, External. Capacity: size in terms of bytes, KB, MB, GB, etc Unit of transfer: How many bits can be moved like bytes, words, Blocks, etc. Access method: How you pick of data Sequential, Direct, Random, etc Performance: Transfer rate n terms of bps Physical type: Which material we are using like semiconductor, Magnetic, Optical, etc Physical characteristics: like power consumption, information loss, volatile, etc Organization: How it stored like continues, interleaved, etc.

2-7-27 Memory Organization 2-5 2-6 2- Memory Hierarchy Memory hierarchy in a computer system Main Memory : unit that communicates directly with the (RAM) Auxiliary Memory : device that provide backup storage (Disk Drives) Cache Memory : special very-high-speed to increase the processing speed (Cache RAM) Auxiliary Magnetic tapes Magnetic disks I/O processor Main Cache Multiprogramming enable the to process a number of independent program concurrently. 2-7 2-8 2-2 Main Memory Bootstrap Loader A program whose function is to start the computer software operating when power is turned on RAM and ROM Chips Typical RAM chip» 28 X 8 RAM : 2 7 = 28 (7 bit lines) Typical ROM chip Chip select Chip select 2 52 X 8 ROM : 2 9 = 52 (9 bit lines) 7 bit 288 RAM (a) Block diagram Memory function State of data bus 8 bit data bus Input data to RAM Output data from RAM Chip select Chip select 2 9 bit AD9 528 ROM 8 bit data bus Memory Address Map Memory Configuration : 52 bytes RAM + 52 bytes ROM» x 52 byte ROM + 4 x 28 bytes RAM Memory Address Map» Address line 9 8 RAM : - 7F RAM : 8 - FF RAM : - 7F RAM : 8 - FF» Address line ROM : 2-3FF Memory Connection to» 2 x 4 Decoder : RAM select ()» Address line RAM select : ROM select : Invert Address bus 6-9 8 7 - Decoder 3 2-7 8 9 288 RAM 288 RAM 2 288 RAM 3 288 RAM 4 288 ROM AD9 bus (b) Function table 2

text 32K2 Cache 522 2-7-27 2-9 2-2-3 Auxiliary Memory Tracks Magnetic Disk : FDD, HDD Magnetic Tape : Backup or Program Optical Disk : CDR, ODD, DVD 2-4 Associative Memory Content Addressable Memory (CAM) A unit accessed by content Block Diagram Sector / head Argument (A) Word A K C A j K j C j A n K n C n M Key (K) A Register K Register Argument Key (Mask) Match Word i C i C ij C in M i Word M = Word 2 M = Match Logic Input Associative array and logic m words n bits per word M Word m C m C mj C mn Bit Bit j Bit n Mm M = Output 2-2-2 2-5 Cache Memory Locality of Reference the references to tend to be confined within a few localized areas in Cache Memory : a fast small keeping the most frequently accessed instructions and data in the fast cache Cache cache size : 256 K byte mapping method : ) associative, 2) direct, 3) set-associative replace algorithm : ) LRU, 2) LFU, 3) FIFO write policy : ) write-through, 2) write-back Hit Ratio the ratio of the number of hits divided by the total references (hits + misses) to» hit : the finds the word in the cache (.9)» miss : the word is not found in cache ( must read main ) cache access time = ns, main access time = ns, hit ratio =.9» miss : x ns + penalty time( x ns)» 9 hit : 9 x ns Mapping The transformation of data from main to cache» ) Associative mapping» 2) Direct mapping» 3) Set-associative mapping Example of cache main : 32 K x 2 bit word (5 bit lines) cache : 52 x 2 bit word» sends a 5-bit to cache Hit : accepts the 2-bit data from cache Miss : reads the data from main (then data is written to cache) Associative mapping Cache associative Address Cache Tag field (n - k) field (k) 2 k words cache + 2 n words main Tag = 6 bit (5-9), = 9 bit Cache Coherence (Sec. 3-5) (5 bits) Argument Address 3 4 5 2 7 7 7 6 7 2 2 3 4 5 2 3 4 3

2-7-27 2-3 2-4 Tag (6 bit) - 63 (9 bit) - 5 Direct mapping cache organization 6 bits 9 bits Tag Hex Address 3F FF 32K2 Address = 5 bits = 2 bits Memory Octal Memory data 2 2 FF 522 Cache Address = 9 bits = 2 bits Tag 2 2 Direct mapping cache with block size of 8 words 64 block x 8 word = 52 cache words size 8 word block update Block Tag 7 7 3 4 5 6 5 7 8 6 6 3 Tag Block Word Tag Tag 3 4 5 2 5 6 7 2 3 4 3 4 5 4 5 6 2 6 7 Block 63 77 2 2 6 7 2 6 7 2 3 4 2 5 6 7 (b) Cache 2 6 7 Set-associative mapping : Fig. 2-5 (two-way) Direct mapping tag ( 2, ) (a) 2-5 2-6 Replacement Algorithm : cache miss or full ) LRU (Least Recently Used): On a miss, the frame that was least recently used in replaced. 2) LFU (Least Frequently Used): It looks forward in time to see which frame to replace on a cache miss. 3) FIFO (First-In First-Out): On a miss, the frame that has been in the longest is replaced. Ex: 2 3 2 5 2 6 2 5 6 3 3 6 2 4 3 Writing to Cache : Cache Coherence» ) -through» 2) -back Cache Initialization Cache is initialized» ) when power is applied to the computer» 2) when main is loaded with a complete set of programs from auxiliary valid bit» indicate whether or not the word contains valid data 2-6 Virtual Memory Virtual Memory : Auxiliary Translate program-generated (Aux. Memory) into main location» Give programmers the illusion that they have a very large, even though the computer actually has a relatively small main Intel Pentium Processor» Physical Address Lines = A - A 3 : 2 32 = 2 3 X 2 2 = 4 Giga» Logical Address = 46 bits : 2 46 = 2 4 X 2 6 = 64 Tera Auxiliary Address Space & Memory Space Address Space : Virtual Address» Address used by a programmer Program Program Memory Space : Physical Address(Location),» Address in main,2 Figure, space (N) = 24 K = 2 2 Program 2» Auxiliary Memory space (M) = 32 K = 2 5» main Memory 2, Address space N = 24K = 2 2 Memory space M = 32K = 2 5 4

2-7-27 2-7 2-8 Memory table for mapping a virtual Translate the 2 bits Virtual into the 5 bits Physical Virtual Memory table in a paged system Line number Virtual Virtual Memory maping (2 bits) table Memory table buffer Address Mapping Using Pages Address mapping Address space space fixed size Address space : K page Memory space : k block (5 bits) Main buffer Page Page Page 2 Page 3 Page 4 Page 5 Page 6 Page 7 Address space N = 8K = 2 3 Block Block 2 Block 3 Memory space M = 4K = 2 2 Table Memory page table Presence bit Block Block 2 Block 3 MBR 2-9 Associative page table Associative block number() Virtual Line number Argument Key Associative Block no. Page(Block) Replacement Page Fault : the page referenced by the is not in main» a new page should be transferred from auxiliary to main Replacement algorithm 5