Memory Management by Segmentation

Slides:



Advertisements
Similar presentations
CSIE30300 Computer Architecture Unit 10: Virtual Memory Hsin-Chou Chi [Adapted from material by and
Advertisements

Virtual Memory Hardware Support
S.1 Review: The Memory Hierarchy Increasing distance from the processor in access time L1$ L2$ Main Memory Secondary Memory Processor (Relative) size of.
Recap. The Memory Hierarchy Increasing distance from the processor in access time L1$ L2$ Main Memory Secondary Memory Processor (Relative) size of the.
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.
Computer Organization and Architecture
Virtual Memory I Chapter 8.
Virtual Memory Deung young, Moon ELEC 5200/6200 Computer Architecture and Design Lectured by Dr. V. Agrawal Lectured by Dr. V.
03/22/2004CSCI 315 Operating Systems Design1 Virtual Memory Notice: The slides for this lecture have been largely based on those accompanying the textbook.
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.
Virtual Memory By: Dinouje Fahih. Definition of Virtual Memory Virtual memory is a concept that, allows a computer and its operating system, to use a.
Lecture 21 Last lecture Today’s lecture Cache Memory Virtual memory
Computer Systems Overview. Page 2 W. Stallings: Operating Systems: Internals and Design, ©2001 Operating System Exploits the hardware resources of one.
Cosc 3P92 Week 9 & 10 Lecture slides
Topics covered: Memory subsystem CSE243: Introduction to Computer Architecture and Hardware/Software Interface.
Computer Architecture Lecture 28 Fasih ur Rehman.
CSE431 L22 TLBs.1Irwin, PSU, 2005 CSE 431 Computer Architecture Fall 2005 Lecture 22. Virtual Memory Hardware Support Mary Jane Irwin (
July 30, 2001Systems Architecture II1 Systems Architecture II (CS ) Lecture 8: Exploiting Memory Hierarchy: Virtual Memory * Jeremy R. Johnson Monday.
IT253: Computer Organization
Computers Operating System Essentials. Operating Systems PROGRAM HARDWARE OPERATING SYSTEM.
Fall 2000M.B. Ibáñez Lecture 17 Paging Hardware Support.
Fundamentals of Programming Languages-II Subject Code: Teaching SchemeExamination Scheme Theory: 1 Hr./WeekOnline Examination: 50 Marks Practical:
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming.  To allocate scarce memory.
4.3 Virtual Memory. Virtual memory  Want to run programs (code+stack+data) larger than available memory.  Overlays programmer divides program into pieces.
Introduction: Memory Management 2 Ideally programmers want memory that is large fast non volatile Memory hierarchy small amount of fast, expensive memory.
CS.305 Computer Architecture Memory: Virtual Adapted from Computer Organization and Design, Patterson & Hennessy, © 2005, and from slides kindly made available.
Protection of Processes Security and privacy of data is challenging currently. Protecting information – Not limited to hardware. – Depends on innovation.
CS 140 Lecture Notes: Virtual MachinesSlide 1 Process Abstraction Instruction Set Registers MMU I/O Devices Physical Memory Virtual Memory System Calls.
LECTURE 12 Virtual Memory. VIRTUAL MEMORY Just as a cache can provide fast, easy access to recently-used code and data, main memory acts as a “cache”
Memory Management memory hierarchy programs exhibit locality of reference - non-uniform reference patterns temporal locality - a program that references.
Computer Systems Overview. Lecture 1/Page 2AE4B33OSS W. Stallings: Operating Systems: Internals and Design, ©2001 Operating System Exploits the hardware.
1 Computer System Overview Chapter 1. 2 Operating System Exploits the hardware resources of one or more processors Provides a set of services to system.
CS161 – Design and Architecture of Computer
Memory: Page Table Structure
Translation Lookaside Buffer
CS 704 Advanced Computer Architecture
Lecture 11 Virtual Memory
Memory Hierarchy Ideal memory is fast, large, and inexpensive
CE 454 Computer Architecture
Memory COMPUTER ARCHITECTURE
Chapter 8: Main Memory.
CS161 – Design and Architecture of Computer
Lecture 12 Virtual Memory.
Virtual Memory User memory model so far:
CS 704 Advanced Computer Architecture
CS510 Operating System Foundations
Virtual Memory Chapter 8.
CS 140 Lecture Notes: Virtual Machines
Lecture 28: Virtual Memory-Address Translation
Lecture 14 Virtual Memory and the Alpha Memory Hierarchy
Computer Architecture
Computer-System Architecture
Module 2: Computer-System Structures
CS 140 Lecture Notes: Virtual Machines
Miss Rate versus Block Size
So far in memory management…
Virtual Memory Virtual memory is a technique which gives an application program the impression that it has contiguous working memory, while in fact it.
Virtual Memory Overcoming main memory size limitation
Contents Memory types & memory hierarchy Virtual memory (VM)
CSE451 Virtual Memory Paging Autumn 2002
CSC3050 – Computer Architecture
Computer Architecture and Organization (CS-507)
Module 2: Computer-System Structures
CS 140 Lecture Notes: Virtual Machines
COMP755 Advanced Operating Systems
Virtual Memory.
4.3 Virtual Memory.
Virtual Memory 1 1.
Presentation transcript:

Memory Management by Segmentation Fig 7.38 Main memory … FFF Segment 5 Gap Segment 1 Physical memory addresses Virtual memory addresses Segment 6 Welcome statements and intro to the speaker will go here Gap Segment 9 Segment 3 000

Review

Virtual Memory

Memory Management System (MMU) The MMU interposed between the CPU and the physical memory. Each memory reference issued by the CPU is translated from the logical address space to physical address space. Since there must be translation for each memory reference, the translation must be performed by hardware because of the speed required.

Memory Management and Address Translation

Memory Management using Segmentation

Continued Although less common than paged virtual memory, memory mangaement by segmentation is still used on some machines. Segmentation allows memory to be divided into parcels, or segments of varying sizes depending upon requirements

CS501 Advanced Computer Architecture Lecture 40 Dr.Noor Muhammad Sheikh

Segmentation Mechanism Fig 7.39 Main memory Gap Segment 5 Segment 1 Segment 6 Segment 9 Segment 3 Offset in segment . Virtual memory address from CPU + Segment base register Bounds error No  Segment limit register

The Intel 8086 Segmentation Scheme Fig 7.40 0000 16-bit logical address 16-bit logical address 0000 V 20-bit logical address

Paging (Fig. 7.41) . Secondary memory Virtual memory Physical memory Page n-1 . Program unit Now we want to focus on what a computer is. The speaker may explain the building blocks in this slide . Page 2 Page 1 Page 0

Virtual Address Translation Fig 7.42 Main memory Physical address Desired word . Virtual address from CPU . Physical page Word Offset in page Page number . Hit. Page in Primary memory Page table . Offset in page table + Miss (page fault). Page in Secondary memory . . Page table base register No  Physical page number or pointer to secondary storage Access- control bits: presence bit, dirty bit, usage bits Bounds error Translate to Disk address . Page table limit register

Multiprogramming Servicing the page fault Save the state of suspended process Handle page fault Resume normal execution

TLB (Fig. 7.43) . . . . Main memory or cache Desired word Virtual address from CPU Physical address . Page number Word Physical page Word Hit. Page in Primary memory Associative lookup of virtual page number in TLB . Y Hit The term “computer architecture” was first used at IBM in 1964 by Amdahl, Blaauw, and Brooks [H&P, 2e]. Their definition of architecture was   .... the structure of a computer that a machine language programmer must understand to write a correct (time independent) program for that machine. By architecture they meant the programmer visible portion of the instruction set. Thus a family of machines of the same architecture should be able to run the same software. This concept is now so common that we take it for granted. The x86 architecture is a well known example. Access- control bits: presence bit, dirty bit, usage bits Physical page number Virtual page number TLB miss. Look for physical page in page table To page table

Page Replacement

Flow Chart (fig. 7.44) CPU Virtual address Cache Secondary memory Main memory Search page table Search cache Search TLB Page fault.Get page from secondary memory Page table hit Y Cache hit TLB hit Y Y Update MM. cache, and page table Miss Miss Miss .... the structure of a computer that a machine language programmer must understand to write a correct (time independent) program for that machine.   By architecture they meant the programmer visible portion of the instruction set. Thus a family of machines of the same architecture should be able to run the same software. This concept is now so common that we take it for granted. The x86 architecture is a well known example. Generte physical address Update cache from MM Generte physical address Update TLB Return value from cahce

DMA DMA Controller Main Memory CPU I/O Device I/O Device I/O Device

Summary

Instruction Cache