MICROPROCESSOR MEMORY ORGANIZATION

Slides:



Advertisements
Similar presentations
MEMORY popo.
Advertisements

1 Lecture 13: Cache and Virtual Memroy Review Cache optimization approaches, cache miss classification, Adapted from UCB CS252 S01.
16.317: Microprocessor System Design I
CSC 4250 Computer Architectures December 8, 2006 Chapter 5. Memory Hierarchy.
MEMORY ORGANIZATION Memory Hierarchy Main Memory Auxiliary Memory
Memory Management Design & Implementation Segmentation Chapter 4.
Chapter 8.3: Memory Management
Informationsteknologi Friday, November 16, 2007Computer Architecture I - Class 121 Today’s class Operating System Machine Level.
Chapter 9 Virtual Memory Produced by Lemlem Kebede Monday, July 16, 2001.
Vacuum tubes Transistor 1948 –Smaller, Cheaper, Less heat dissipation, Made from Silicon (Sand) –Invented at Bell Labs –Shockley, Brittain, Bardeen ICs.
Virtual Memory Deung young, Moon ELEC 5200/6200 Computer Architecture and Design Lectured by Dr. V. Agrawal Lectured by Dr. V.
Virtual Memory BY JEMINI ISLAM. What is Virtual Memory Virtual memory is a memory management system that gives a computer the appearance of having more.
1 Lecture 16B Memories. 2 Memories in General RAM - the predominant memory ROM (or equivalent) needed to boot ROM is in same class as Programmable Logic.
1  1998 Morgan Kaufmann Publishers Chapter Seven Large and Fast: Exploiting Memory Hierarchy (Part II)
VIRTUAL MEMORY. Virtual memory technique is used to extents the size of physical memory When a program does not completely fit into the main memory, it.
Microprocessor-based systems Curse 7 Memory hierarchies.
Lecture 19: Virtual Memory
1 Chapter 3.2 : Virtual Memory What is virtual memory? What is virtual memory? Virtual memory management schemes Virtual memory management schemes Paging.
IT253: Computer Organization
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming  To allocate scarce memory resources.
Computer Organization & Assembly Language © by DR. M. Amer.
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming.  To allocate scarce memory.
Introduction to Virtual Memory and Memory Management
Introduction: Memory Management 2 Ideally programmers want memory that is large fast non volatile Memory hierarchy small amount of fast, expensive memory.
EFLAG Register of The The only new flag bit is the AC alignment check, used to indicate that the microprocessor has accessed a word at an odd.
Multilevel Caches Microprocessors are getting faster and including a small high speed cache on the same chip.
MICROPROCESSOR MEMORY ORGANIZATION 1.  3.1 Introduction  3.2 Main memory  3.3 Microprocessor on-chip memory management unit and cache 2.
Memory Devices 1. Memory concepts 2. RAMs 3. ROMs 4. Memory expansion & address decoding applications 5. Magnetic and Optical Storage.
Overview of microcomputer structure and operation
1 بسم الله الرحمن الرحيم MEMORY AND I/O. Introduction to 8086 Microprocessor 8086 Pin Configuration Pin Configuration 8086 Architecture & Modes 2.
CMSC 611: Advanced Computer Architecture Memory & Virtual Memory Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material.
Index What is an Interface Pins of 8085 used in Interfacing Memory – Microprocessor Interface I/O – Microprocessor Interface Basic RAM Cells Stack Memory.
CS 704 Advanced Computer Architecture
32- bit Microprocessor-Intel 80386
Chapter 2 Memory and process management
Memory COMPUTER ARCHITECTURE
Memory Management Paging (continued) Segmentation
CSE 120 Principles of Operating
Random access memory Sequential circuits all depend upon the presence of memory. A flip-flop can store one bit of information. A register can store a single.
COMBINED PAGING AND SEGMENTATION
Random access memory Sequential circuits all depend upon the presence of memory. A flip-flop can store one bit of information. A register can store a single.
Memory Units Memories store data in units from one to eight bits. The most common unit is the byte, which by definition is 8 bits. Computer memories are.
Memory chips Memory chips have two main properties that determine their application, storage capacity (size) and access time(speed). A memory chip contains.
Chapter 8: Main Memory.
MICROPROCESSOR MEMORY ORGANIZATION
Interfacing Memory Interfacing.
Part V Memory System Design
CMSC 611: Advanced Computer Architecture
MEMORY ORGANIZATION Memory Hierarchy Main Memory Auxiliary Memory
Background Program must be brought into memory and placed within a process for it to be run. Input queue – collection of processes on the disk that are.
Memory Management Paging (continued) Segmentation
MICROPROCESSOR MEMORY ORGANIZATION
Module IV Memory Organization.
MEMORY ORGANIZATION Memory Hierarchy Main Memory Auxiliary Memory
Main Memory Background Swapping Contiguous Allocation Paging
Chap. 12 Memory Organization
Memory Organization.
MICROPROCESSOR MEMORY ORGANIZATION
第四章 80386的存贮器和输入/输出接口 作业:P335 5,7,13,17,21,25,36,37,41,44,45,46,48,52,65 21:46.
Contents Memory types & memory hierarchy Virtual memory (VM)
Random access memory Sequential circuits all depend upon the presence of memory. A flip-flop can store one bit of information. A register can store a single.
Chapter 5 Computer Organization
Main Memory Background
Computer Architecture and Organization (CS-507)
Assembly Language for Intel-Based Computers, 5th Edition
Memory Management Paging (continued) Segmentation
Cache Memory and Performance
4.3 Virtual Memory.
Page Main Memory.
Presentation transcript:

MICROPROCESSOR MEMORY ORGANIZATION Chapter 3 MICROPROCESSOR MEMORY ORGANIZATION

3.2.4 Main Memory Organization Magnetic tapes disks I/O CPU Main memory Cache Auxiliary memory Typical RAM chip RAS CAS Read Write 10-bit address RD WR AD 10 1M X 8 RAM 8-bit data bus DRAM Organization DRAM is addressed via row and column addressing.

3.2.4 Main Memory Organization DRAM Organization 1 -Mb DRAM requiring 20 address bits is addressed using 10 address lines and two control lines, RAS (row address strobe) and CAS (column address strobe). To provide a 20-bit address into the DRAM, a LOW is applied to RAS and 10 bits of the address are latched. The other 10 bits of the address are applied next and CAS is then held LOW. Column Decoder Memory Array A0…A 9 W ord Line Storage Cell Row Decoder … … RAS CAS

3.2.4 Main Memory Organization The addressing capability of the DRAM can be increased by a factor of 4 by adding External logic is required to generate the RAS and CAS signals and to output the current address bits to the DRAM. 220 X 4 = 220 X 22

3.2.4 Main Memory Organization DRAM controller chips take care of the refreshing and timing requirements needed by DRAMs. DRAMs typically require a 4-ms refresh time, it sends a wait signal to the microprocessor if the microprocessor tries to access memory during a refresh cycle

3.2.5 Main Memory Array Design Memory Array Design means: Interconnecting several memory chips. A microprocessor can address directly a maximum of 216 = 65,536 or 64K bytes of memory locations. M /IO › LOW : if the microprocessor executes an I/O instruction M /IO › HIGH: if the microprocessor executes a memory instruction.

3.2.5 Main Memory Array Design Chip Select M/IO

3.2.5 Main Memory Array Design To connect a microprocessor to ROM/RAM chips, two address-decoding techniques are commonly used: Linear decoding Full decoding. Typical ROM chip Chip select 1 Chip select 2 9-bit address CS1 CS2 AD 9 512 x 8 ROM 8-bit data bus

3.2.5 Main Memory Array Design Linear decoding Suppose we have 4K SRAM chip array comprised of the four 1K SRAM chips This system can be expanded up to a total capacity of 6K using A14, and A15, as chip selects for two more 1K SRAM chips.

3.2.5 Main Memory Array Design Linear decoding Advantage does not require decoding hardware. Linear decoding Disadvantage 1. Bus Conflict: two or more of lines A10-A13are low at the same time, more than one SRAM chip are selected. Solution: software must be written such that it never reads into or writes from any address in which more than one of bits A10-A13are low. 2. Memory Foldback : Wastes a large amount of address space. For example, whenever the address value is B800 or 3800, SRAM chip I is selected. Solution: use full decoded memory addressing.

3.2.5 Main Memory Array Design Full Decoding. Using 3x8 decoder output selects one of the four IK SRAM chips, depending on the values of A12, A11, and A10 Decoder output enabled only when E3 = E2 = 0 and E l = 1

3.3.1 Memory Management Concepts Access to a hard disk is Slow. Solution: use a large and fast locally accessed semiconductor memory SRAM. Unfortunately, the storage cost per bit for this solution is very high. A combination of both off-board disk (secondary memory) and on-board semiconductor main memory must be designed into a system. Gap grew 50% per year

3.3.1 Memory Management Concepts Memory Management Unit (MMU): A device, located between the microprocessor and memory The address used by a programmer will be called a logical address/ Virtual address An address in main memory is called a physical address Control accesses, perform address mappings, and act as an interface between the logical (programmer’s memory) and physical memory

3.3.1 Memory Management Concepts MMU address translation: The MMU can perform address translation in one of two ways: Substitution technique Addition an offset to each logical address to obtain the corresponding physical address

3.3.1 Memory Management Concepts MMU address translation: Substitution technique is faster Offset method has the advantage of mapping a logical address to any physical address as determined by the offset value.

3.3.1 Memory Management Concepts MMU address translation: Memory is usually divided into small manageable units: Page Segment. Combined Paging-Segmentation Paging divides the memory into equal sized pages Segmentation divides the memory into variable- sized segments. It is relatively easier to implement the address translation table if the logical and main memory spaces are divided into pages.

3.3.1 Memory Management Concepts The Paging method The virtual memory system is managed by both hardware and software. The hardware included in MMU and memory management software in operating system to perform all functions including page replacement policies to provide efficient memory utilization.

The Paging method

3.3.1 Memory Management Concepts The Segmentation method An MMU utilizes the Segment Selector to obtain a descriptor from a table in memory containing several descriptors. Global Descriptor Table (GDT): Contains The physical base address for a segment, The segment’s privilege level, Some control bits. Each program has: Local Descriptor Table (LDT) That holds descriptor for each segment used by the program

Each segment descriptor indexes into the program's local descriptor table (LDT). Each table entry is mapped to a linear address:

3.3.1 Memory Management Concepts The Segmentation method When the MMU obtains a logical address from the microprocessor MMU determines whether the segment is already in physical memory. If it is, the MMU adds an offset component to the segment base component of the address obtained from the segment descriptor table to provide the physical address. MMU then generates the physical address on the address bus for selecting the memory.

3.3.1 Memory Management Concepts The paged-segmentation method Each segment contains a number of pages. The logical address is divided into three components: segment, page, and word. A page component of n bits can provide up to 2n pages. A segment can be assigned with one or more pages up to maximum of 2n pages; therefore, a segment size depends on the number of pages assigned to it.

3.3.1 Memory Management Concepts The Virtual memory: A technique that uses main memory as a “cache” for secondary storage. virtual address: An address generated by a user program is virtual address The key idea behind the virtual memory is to allow a user program to address more locations than those available in a physical memory. Two major motivations for virtual memory: to allow efficient and safe sharing of memory among multiple programs to remove the programming burdens of a small, limited amount of main memory. CPU and OS translate virtual addresses to physical addresses

Mapping Pages to Storage

Paging with virtual addressing Programs share main memory, each program gets a private virtual address space holding its frequently used code and data and this is protected from other programs.