Memory Management & Virtual Memory

Slides:



Advertisements
Similar presentations
CS 241 Spring 2007 System Programming 1 Memory Replacement Policies Lecture 32 Klara Nahrstedt.
Advertisements

§12.4 Static Paging Algorithms
Chapter 4 Memory Management Page Replacement 补充:什么叫页面抖动?
1 Virtual Memory Management B.Ramamurthy. 2 Demand Paging Main memory LAS 0 LAS 1 LAS 2 (Physical Address Space -PAS) LAS - Logical Address.
Virtual Memory Background Demand Paging Performance of Demand Paging
Virtual Memory Introduction to Operating Systems: Module 9.
Memory/Storage Architecture Lab Computer Architecture Virtual Memory.
Chapter 101 Virtual Memory Chapter 10 Sections and plus (Skip:10.3.2, 10.7, rest of 10.8)
CS 104 Introduction to Computer Science and Graphics Problems
Virtual Memory. Names, Virtual Addresses & Physical Addresses Source Program Absolute Module Name Space P i ’s Virtual Address Space P i ’s Virtual Address.
CSI 400/500 Operating Systems Spring 2009 Lecture #9 – Paging and Segmentation in Virtual Memory Monday, March 2 nd and Wednesday, March 4 th, 2009.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 9: Virtual Memory.
Virtual Memory Management B.Ramamurthy. Paging (2) The relation between virtual addresses and physical memory addres- ses given by page table.
1 Virtual Memory Management B.Ramamurthy Chapter 10.
Memory Management 2 Tanenbaum Ch. 3 Silberschatz Ch. 8,9.
Basics of Operating Systems March 4, 2001 Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard.
Slide 12-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter Virtual Memory.
Maninder Kaur VIRTUAL MEMORY 24-Nov
Virtual Memory.
Chapter 3 Memory Management: Virtual Memory
Rensselaer Polytechnic Institute CSC 432 – Operating Systems David Goldschmidt, Ph.D.
MEMORY MANAGEMENT Presented By:- Lect. Puneet Gupta G.P.C.G. Patiala.
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.
Memory Management Techniques
Subject: Operating System.
By Andrew Yee. Virtual Memory Memory Management What is Page Replacement?
CSC 360, Instructor: Kui Wu Memory Management II: Virtual Memory.
Memory Management & Virtual Memory © Dr. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada.
Homework Assignment #3 J. H. Wang Nov. 13, 2015.
Virtual Memory The address used by a programmer will be called a virtual address or logical address. An address in main memory is called a physical address.
Chapter 9: Virtual-Memory Management. 9.2 Silberschatz, Galvin and Gagne ©2005 Operating System Principles Chapter 9: Virtual-Memory Management 9.1 Background.
VIRTUAL MEMORY Virtual Address Space. In computing, virtual address space (abbreviated VAS) is a memory mapping mechanism available in modern operating.
1 Chapter 10: Virtual Memory Background Demand Paging Process Creation Page Replacement Allocation of Frames Thrashing Operating System Examples (not covered.
Chapters 3 and 5 Possible questions
Logistics Homework 5 will be out this evening, due 3:09pm 4/14
Virtual memory.
High-level Synchronization
Chapter 9: Virtual Memory – Part I
Computer Architecture
Chapter 9: Virtual Memory
Operating Systems: A Modern Perspective, Chapter 12
Module 9: Virtual Memory
Basic Synchronization Principles
Device Management & Deadlock
Synchronization Memory Management
Chapter 9: Virtual-Memory Management
Page Replacement.
Chapter 15 – Part 1 The Internal Operating System
CS241 Section: Week 10.
High-level Synchronization
Lecture 39 Syed Mansoor Sarwar
5: Virtual Memory Background Demand Paging
Synchronization Memory Management
Basic Synchronization Principles
Basic Synchronization Principles (Continue)
Computer Architecture
Basic Synchronization Principles (Continue)
Exercise (11).
High-level Synchronization
Exercise (10).
Scheduling & File Management
Module 9: Virtual Memory
High-level Synchronization (Continue)
COMP755 Advanced Operating Systems
Chapter 9: Virtual Memory CSS503 Systems Programming
Student : Yan Wang student ID:
Device Management & Deadlock
Virtual Memory.
CSE 542: Operating Systems
Scheduling & File Management
Presentation transcript:

Memory Management & Virtual Memory Operating Systems Memory Management & Virtual Memory 1) These notes are © Aiman Hanna. All copyrights reserved. For more information please e-mail to: Contact@AimanHanna.com. 2) These notes are also based on: Operating Systems, 3rd edition by Garry Nutts, published by Addison Wesley, ISBN-10: 0201773449 | ISBN-13: 9780201773446 . These notes still totally enforce all copyrights for Nutts/ Addison Wesley. For more information on these rights, please refer to the original publication of the book. 3) VERY IMPORTANT: These notes are neither complete nor sufficient to study for the course. They are merely given so that you can follow the covered subjects. You should NEVER depend solely on these notes for your study. Any use of these notes that results in violation of any of the copyrights indicated above is strictly prohibited. © Dr. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada Data Communications & Computer Networking, by: Aiman Hanna

Managing Free Memory Blocks Best fit & Worst fit strategies Comparisons between the two, which one is possibly better?

Dynamic Address Space Binding Also referred to as dynamic address relocation CPUs need to include relocation registers If the process is divided/broken into segments, then multiple registers are needed (i.e. code/text register, stack register, data register)

Bound Checking How the memory manager can provide a service to the security manager Include a limit register in the CPU and validate all memory access requests against that limit

Virtual Memory What is it? Implementing virtual memory using segmentation Advantages of segmentation Potential problems and disadvantages of segmentation

Virtual Memory through Demand Paging What is paging? Advantages of paging Difference between pages and frames

Paging – Mapping between Virtual and Physical Addresses Utilization of page tables Virtual address translation of paging Page faults and their overhead Different strategies to reduce page faults What is a paging reference stream?

Static Paging Algorithms for Page Replacement Random Replacement Belady Optimal Replacement Least Recently Used (LRU) / Most Recently Used (MRU) Least Frequently Used (LFU) / Most Frequently Used (MFU)

Static Paging Algorithms for Page Replacement Stack Algorithms Why First In First Out (FIFO) is not a good replacement algorithm Belady’s anomaly problem

Attempts to Reduce Page Faults Increase number of frames allocated to the process Will this always achieve better performance (less page faults)? Why? Are there any disadvantages of such approach?

Dynamic Paging Algorithms The Working Set algorithm Advantages/Disadvantages Are there any disadvantages of such approach?

Severity of Page Faults Examples were given in class to show how sever page faults can be in terms of degrading system performance What is trashing What can be done to reduce page faults? Reserving some memory space to reduce the number of page faults Advantages and disadvantages of this solution

Where is this week coverage in the textbook? Chapter 11: Figure 11.16 (page 435) and its discussion Section 11.5 with the following exceptions: Skip: Using Cache Memory & Shared Memory Multiprocessors (page 446 to page 450)

Where is this week coverage in the textbook? Chapter 12: Section 12.1 to 12.6 with the following exceptions: Skip: Implementing LRU (page 480) Windows NT/2000/XP Virtual Memory (page 489 to 493) Linux Virtual Memory (page 493 to 495) Also Skip section 12.7 Important Notes: Some examples were given in class to show how severe page faults can be on performance. Different solutions & proposals to reduce the number of page faults were also discussed. You must refer to your class notes for these examples and the proposed solutions.  Also notice that MRU & MFU were discusses in class.