Chapter 10 – Virtual Memory Organization Outline 10.1 Introduction 10.2Virtual Memory: Basic Concepts 10.3Block Mapping 10.4Paging 10.4.1Paging Address.

Slides:



Advertisements
Similar presentations
Multilevel Page Tables
Advertisements

Memory.
Part IV: Memory Management
Paging Hardware With TLB
4/14/2017 Discussed Earlier segmentation - the process address space is divided into logical pieces called segments. The following are the example of types.
Allocating Memory.
Chapter 101 Virtual Memory Chapter 10 Sections and plus (Skip:10.3.2, 10.7, rest of 10.8)
CS 333 Introduction to Operating Systems Class 12 - Virtual Memory (2) Jonathan Walpole Computer Science Portland State University.
Memory Management (II)
Chapter 3.2 : Virtual Memory
9.9.2 Memory Placement Strategies Where to put incoming processes –First-fit strategy Process placed in first hole of sufficient size found Simple, low.
1 Chapter 8 Virtual Memory Virtual memory is a storage allocation scheme in which secondary memory can be addressed as though it were part of main memory.
Memory Management Five Requirements for Memory Management to satisfy: –Relocation Users generally don’t know where they will be placed in main memory May.
Virtual Memory I Chapter 8.
Chapter 91 Translation Lookaside Buffer (described later with virtual memory) Frame.
Silberschatz, Galvin and Gagne  Operating System Concepts Segmentation Memory-management scheme that supports user view of memory. A program.
Main Memory. Background Program must be brought (from disk) into memory and placed within a process for it to be run Main memory and registers are only.
Multilevel Page Tables Multilevel page tables –System can store in discontiguous locations in main memory those portions of process’s page table.
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.
Virtual Memory Main Memory Magnetic Disk Upper level Lower level.
Virtual Memory Chantha Thoeun. Overview  Purpose:  Use the hard disk as an extension of RAM.  Increase the available address space of a process. 
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 346, Royden, Operating System Concepts Operating Systems Lecture 24 Paging.
Chapter 8 Memory Management Dr. Yingwu Zhu. Outline Background Basic Concepts Memory Allocation.
Computer Architecture Lecture 28 Fasih ur Rehman.
1 Chapter 3.2 : Virtual Memory What is virtual memory? What is virtual memory? Virtual memory management schemes Virtual memory management schemes Paging.
CIS250 OPERATING SYSTEMS Memory Management Since we share memory, we need to manage it Memory manager only sees the address A program counter value indicates.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 9: Memory Management Background Swapping Contiguous Allocation Paging Segmentation.
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming  To allocate scarce memory resources.
8.1 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Paging Physical address space of a process can be noncontiguous Avoids.
CE Operating Systems Lecture 14 Memory management.
1 Memory Management (b). 2 Paging  Logical address space of a process can be noncontiguous; process is allocated physical memory whenever the latter.
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming.  To allocate scarce memory.
Main Memory. Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Paging Structure of the Page Table Segmentation Example: The.
9.1 Operating System Concepts Paging Example. 9.2 Operating System Concepts.
Operating Systems Unit 7: – Virtual Memory organization Operating Systems.
Introduction: Memory Management 2 Ideally programmers want memory that is large fast non volatile Memory hierarchy small amount of fast, expensive memory.
Memory Management. Why memory management? n Processes need to be loaded in memory to execute n Multiprogramming n The task of subdividing the user area.
1  2004 Morgan Kaufmann Publishers Chapter Seven Memory Hierarchy-3 by Patterson.
CHAPTER 3-3: PAGE MAPPING MEMORY MANAGEMENT. VIRTUAL MEMORY Key Idea Disassociate addresses referenced in a running process from addresses available in.
Lectures 8 & 9 Virtual Memory - Paging & Segmentation System Design.
Chapter 8: Main Memory. 8.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 22, 2005 Memory and Addressing It all starts.
8.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Fragmentation External Fragmentation – total memory space exists to satisfy.
Operating Systems Session 7: – Virtual Memory organization Operating Systems.
Memory Management Chapter 5 Advanced Operating System.
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 2: The Linux System Part 4.
1 Contents Memory types & memory hierarchy Virtual memory (VM) Page replacement algorithms in case of VM.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 8: Main Memory.
Chapter 7: Main Memory CS 170, Fall Program Execution & Memory Management Program execution Swapping Contiguous Memory Allocation Paging Structure.
W4118 Operating Systems Instructor: Junfeng Yang.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 33 Paging Read Ch. 9.4.
Memory: Page Table Structure
Basic Paging (1) logical address space of a process can be made noncontiguous; process is allocated physical memory whenever the latter is available. Divide.
Memory Management Virtual Memory.
Chapter 2: The Linux System Part 4
Memory COMPUTER ARCHITECTURE
CSE 120 Principles of Operating
COMBINED PAGING AND SEGMENTATION
Chapter 8: Main Memory Source & Copyright: Operating System Concepts, Silberschatz, Galvin and Gagne.
Paging and Segmentation
Chapter 8: Main Memory.
Storage Management Chapter 9: Memory Management
Operating System Concepts
Memory Management 11/17/2018 A. Berrached:CS4315:UHD.
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.
Main Memory Background Swapping Contiguous Allocation Paging
Lecture 3: Main Memory.
Contents Memory types & memory hierarchy Virtual memory (VM)
Chapter 8: Memory Management strategies
Presentation transcript:

Chapter 10 – Virtual Memory Organization Outline 10.1 Introduction 10.2Virtual Memory: Basic Concepts 10.3Block Mapping 10.4Paging Paging Address Translation by Direct Mapping Paging Address Translation by Associative Mapping Paging Address Translation with Direct/Associative Mapping Multilevel Page Tables Inverted Page Tables Sharing in a Paging System 10.5Segmentation Segmentation Address Translation by Direct Mapping Sharing in a Segmentation System Protection and Access Control in Segmentation Systems 10.6Segmentation/Paging Systems Dynamic Address Translation in a Segmentation/Paging System Sharing and Protection in a Segmentation/Paging System 10.7Case Study: IA-32 Intel Architecture Virtual Memory

Objectives After reading this chapter, you should understand: –the concept of virtual memory. –paged virtual memory systems. –segmented virtual memory systems. –combined segmentation/paging virtual memory systems. –sharing and protection in virtual memory systems. –the hardware that makes virtual memory systems feasible. –the IA-32 Intel architecture virtual memory implementation.

10.1 Introduction Virtual memory –Solves problem of limited memory space –Creates the illusion that more memory exists than is available in system –Two types of addresses in virtual memory systems Virtual addresses –Referenced by processes Physical addresses –Describes locations in main memory –Memory management unit (MMU) Translates virtual addresses to physical address

Figure 10.1 Evolution of memory organizations Introduction

10.2 Virtual Memory: Basic Concepts Virtual address space, V –Range of virtual addresses that a process may reference Real address space, R –Range of physical addresses available on a particular computer system Dynamic address translation (DAT) mechanism –Converts virtual addresses to physical addresses during program execution

Figure 10.3 Pieces of address spaces exist in memory and in virtual storage Virtual Memory: Basic Concepts Q: What does OS do in this picture? Q: |V| >> |R|?

10.3 Block Mapping Two contiguous instructions In V? In R? Figure 10.5 Artificial contiguity.

10.3 Block Mapping Pages –Blocks are fixed size –Technique is called paging Segments –Blocks maybe of different size –Technique is called segmentation Block mapping –System represents addresses as ordered pairs Figure 10.6 Virtual address format in a block mapping system.

Figure 10.7 Virtual address translation with block mapping Block Mapping

10.4 Paging Paging uses fixed-size block mapping –Virtual address in paging system is an ordered pair v = (p, d) p is the number of the page in virtual memory on which the referenced item resides d is the displacement from the start of page p at which the referenced item is located Figure 10.8 Virtual address format in a pure paging system.

Figure 10.9 Main memory divided into page frames Paging Page frame –Fixed-size block of main memory –Begins at a main memory address that is an integral multiple of fixed page size (ps)

Figure Correspondence between virtual memory addresses and physical memory addresses in a pure paging system Paging Q: What is the significance of dividing the VM and MEM into equal-sized pages?

10.4 Paging Page table entry (PTE) –Indicates that virtual page p corresponds to page frame p´ –Contains a resident bit to indicate if page is in memory If so, PTE stores the page’s frame number Otherwise, PTE stores the location of the page on secondary storage Figure Page table entry.

Paging Address Translation by Direct Mapping Direct mapping –Dynamic address translation under paging is similar to block address translation –Process references virtual address v = (p, d) DAT adds the process’s page table base address, b, to referenced page number, p b + p forms the main memory address of the PTE for page p System concatenates p´ with displacement, d, to form real address, r

Figure Paging address translation by direct mapping Paging Address Translation by Direct Mapping

Page # Offset/displacement Virtual address Page table Q. Suppose that the secondary storage compartment is not listed in the page table here. What is the physical address? Group Discussion /11/08