# Paging: Design Issues

Save this PDF as:

Size: px
Start display at page:

## Transcription

1 Paging: Design Issues 1!

2 2!

3 Readings Silbershatz et al: !

4 Outline Frame Allocation Case Studies 4!

5 Thrashing A process causing page faults every few instructions is said to be thrashing If a process does not have enough pages, the page-fault rate is very high. This leads to: low CPU utilization; operating system thinks that it needs to increase the degree of multiprogramming; another process added to the system; To minimize thrashing requires that we carefully consider issues related to frame allocation 5!

6 Frame Allocation How do we allocate the fixed amount of memory among the various processes What is the minimum number of frames? How many frames should a process get? Should a process replace a page being used by another process? 6!

7 Minimum Number of Frames Each process needs a minimum number of pages Example: 6 pages needed by one instruction Instruction might span 2 pages 1 st argument spans 2 pages 2 nd argument spans 2 pages We must have enough frames to hold all the different pages that any single instruction can reference The minimum number of frames is defined by the computer architecture 7!

8 Global vs Local Allocation We have discussed several algorithms for choosing a page to replace when a page fault occurs Should a process only be allowed to replace any page or only its pages? Global vs Local 8!

9 Global vs. Local Allocation Global replacement Process selects a replacement frame from the set of all frames A process can take a frame from another based on some priority scheme Allows for the number of frames assigned to a process to dynamically vary A process cannot control its own page-fault rate 9!

10 Global vs. Local Allocation Local replacement Each process selects from only its own set of allocated frames Corresponds to allocating every process a fixed fraction of memory This assumes a fixed allocation of frames to a process A process that thrashes cannot cause another process to thrash by stealing its frames 10!

11 Global vs. Local Allocation Which is better global or local? On the surface it may seem that local is better since thrashing problems can t spread but.. I/O Competition: Other thrashing processes Processes that may page fault but are not necessarily thrashing This implies a average longer wait for the disk read 11!

12 Global vs. Local Allocation The number of pages actually needed (working set) varies over time Global usually means better utilization If the working set shrinks local algorithms waste memory Global algorithms are usually used but some operating systems use a mix 12!

13 Global Allocation If a global algorithm is used the operating system must decide how many frames to assign to each process Fixed vs proportional 13!

14 Fixed vs Proportional Allocation All processes are started with the same number of pages (fixed) Does it really make sense to start a small process with the same number as a large process Allocate based on process size (proportional) 14!

15 Prepaging Other Considerations A page fault occur when a page is not found in memory You can bring that page in as well as adjacent pages In reading from disk most of the overhead is in waiting for the disk to be in a position to read the data The actual transfer of data is relatively slow Why not then read several pages into memory? 15!

16 Other Considerations Copy-on-Write Remember that the fork() system call works by creating a copy of the parent s address space for the child You can allow the parent and the child to initially share the same pages When a child needs a page then a copy is made. 16!

17 Other Considerations I/O Interlock Pages must sometimes be locked into memory Consider I/O - Pages that are used for copying a file from a device must be locked from being selected for eviction by a page replacement algorithm 17!

18 Case Study Windows Virtual memory with demand page Can support 32 or 64 bit Has a pool of free frames Uses prepaging (called clustering) What happens if the amount of free memory falls below some threshold? Each process has a minimum number of processes Windows will take away pages that exceed that minimum Applies LRU Locally 18!

19 Case Study - Window Each process is guaranteed to have a minimum number of frames Each process has a maximum number of frames If a page fault occurs for a process that has the maximum number of frames a local replacement policy is used If a page fault occurs for a process that is below its working set maximum a free frame is used. 19!

20 Case Study Solaris Virtual memory with demand paging Can support 32 or 64 bit Global replacement 20!

21 Case Study Solaris Maintains a list of free frames A free frame is is assigned to a process that page faults. If the number of free pages falls below a treshold value (lotsfree) a process called pageout starts. pageout process Scans all pages and sets a reference bit to 0 Later it checks the pages to determine if it has been written to. If not it is freed. Pages that are shared are not freed. 21!

22 Case Study - Linux Virtual memory with demand paging Can support 32 or 64 bit Global replacement Replacement Least recently used (LRU) policy Different implementations for different systems 22!

23 Case Study-Android, IoS PCs and Servers: Support some form of swapping Mobile devices -- Rely a lot on flash memory for persistent storage It s fast Flash memory can tolerate a limited number of writes before it becomes unreliable Support Typically no swapping Paged systems 23!

24 Case Study-Android No swap space for memory Does have Paging Map pages to physical pages Implications Modified data (e.g., stack is not removed) Read-only data (e.g., code) can be removed from the system and reloaded from flash memory 24!

25 Case Study -- Android Sharing Memory Each app is forked from an existing process called Zygote Zygote loads framework code RAM pages allocated for framework code is shared by application processes Static data (e.g., code) is often mapped to specific pages Some dynamic memory is explicitly shared by Android and applications Example: Window surfaces use shared memory between the app and screen compositor 25!

26 Case Study - Android Switching applications Android keeps processes that are not hosting a foreground ("user visible") app component in a least-recently used (LRU) cache. The system keeps the process cached, so if the user later returns to the app, the process is reused for faster app switching. As the system runs low on memory, it may kill processes in the LRU cache beginning with the process least recently used 26!

27 Case Study-Android Implications Developers must carefully allocate and release memory to ensure that their applications do not use too much memory or suffer from memory leaks 27!

28 Summary This section studied how page tables are implemented Case Studies are presented 28!

### Chapter 9: Virtual Memory. Operating System Concepts 8 th Edition,

Chapter 9: Virtual Memory, Silberschatz, Galvin and Gagne 2009 Chapter 9: Virtual Memory Background Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing Memory-Mapped Files Allocating

### Operating System Concepts 7 th Edition, Feb 22, 2005

Chapter 9: Virtual Memory Chapter 9: Virtual Memory Background Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing Memory-Mapped Files Allocating Kernel Memory Other Considerations

### ! Background! Demand Paging! Process Creation! Page Replacement. ! Allocation of Frames! Thrashing! Demand Segmentation! Operating System Examples

Chapter 9: Virtual Memory Background Demand Paging Process Creation Page Replacement Chapter 9: Virtual Memory Allocation of Frames Thrashing Demand Segmentation Operating System Examples Background 9.2

### CS420: Operating Systems

Virtual Memory James Moscola Department of Engineering & Computer Science York College of Pennsylvania Based on Operating System Concepts, 9th Edition by Silberschatz, Galvin, Gagne Background Code needs

### Basic Page Replacement

Basic Page Replacement 1. Find the location of the desired page on disk. Find a free frame: - If there is a free frame, use it - If there is no free frame, use a page replacement algorithm to select a

### Al-Anbar University /College of Computer Lecture Eight / Virtual Memory

8. Virtual Memory 8.1 Background 8.2 Demand Paging 8.3 Process Creation 8.4 Page Replacement 8.5 Allocation of Frames 8.6 Thrashing 8.7 Demand Segmentation 8.8 Examples 8.1 Background Virtual memory is

### Chapter 10: Virtual Memory. Virtual memory. Background Demand Paging Page Replacement Allocation of Frames Thrashing Operating System Example

Chapter 0: Virtual Memory Background Demand Paging Page Replacement Allocation of Frames Thrashing Operating System Example 0. Virtual memory separation of logical memory from physical memory only part

### Chapter 9: Virtual-Memory Management

Chapter 9: Virtual-Memory Management Chapter 9: Virtual Memory Background Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing Memory-Mapped Files Allocation Kernel Memory Other

### Chapter 10: Virtual Memory. Background

Chapter 10: Virtual Memory Background Demand Paging Process Creation Page Replacement Allocation of Frames Thrashing Demand Segmentation Operating System Examples 10.1 Silberschatz, Galvin and Gagne 2003

### Last Class: Demand Paged Virtual Memory!

Last Class: Demand Paged Virtual Memory! Benefits of demand paging: Virtual address space can be larger than physical address space. Processes can run without being fully loaded into memory. Processes

### Chapter 9: Virtual Memory

Chapter 9: Virtual Memory Chapter 9: Virtual Memory Background Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing Memory-Mapped Files Allocating Kernel Memory Other Considerations

### Chapter 9: Virtual Memory

Chapter 9: Virtual Memory Chapter 9: Virtual Memory Background Demand Paging Process Creation Page Replacement Allocation of Frames Thrashing Demand Segmentation Operating System Examples 9.2 Silberschatz,

### Virtual Memory. Virtual Memory

Virtual Memory Gordon College Stephen Brinton Virtual Memory Background Demand Paging Process Creation Page Replacement Allocation of Frames Thrashing Demand Segmentation Operating System Examples Background

### ICS Principles of Operating Systems

ICS 143 - Principles of Operating Systems Lectures 15 and 16 - Virtual Memory Prof. Ardalan Amiri Sani Prof. Nalini Venkatasubramanian ardalan@uci.edu nalini@ics.uci.edu Virtual Memory Background Demand

### Chapter 9: Virtual-Memory Management

Chapter 9: Virtual-Memory Management Chapter 9: Virtual Memory Background Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing Memory-Mapped Files Allocation Kernel Memory Other

### VIRTUAL MEMORY MANAGEMENT, PART 3. CS124 Operating Systems Winter , Lecture 22

VIRTUAL MEMORY MANAGEMENT, PART 3 CS124 Operating Systems Winter 2013-2014, Lecture 22 2 Page Allocation Policy Last time, covered a number of page replacement policies Handle case when a page must be

### Virtual Memory. Reading: Silberschatz chapter 10 Reading: Stallings. chapter 8 EEL 358

Virtual Memory Reading: Silberschatz chapter 10 Reading: Stallings chapter 8 1 Outline Introduction Advantages Thrashing Principal of Locality VM based on Paging/Segmentation Combined Paging and Segmentation

### Memory Management Thrashing, Segmentation and Paging

Memory Management Thrashing, Segmentation and Paging CS 416: Operating Systems Design, Spring 2011 Department of Computer Science Rutgers Sakai: 01:198:416 Sp11 (https://sakai.rutgers.edu) Summary of Page

### Up until now we assumed that an entire program/process needed to be in memory to execute

Lecture Overview Virtual memory Demand paging Page faults Page replacement Frame allocation Thrashing Operating Systems - June 7, 00 Virtual Memory Up until now we assumed that an entire program/process

### Module 10: Virtual Memory

Module 10: Virtual Memory Background Demand Paging Performance of Demand Paging Page Replacement Page-Replacement Algorithms Allocation of Frames Thrashing Other Considerations Demand Segmenation Applied

### Lecture 4: Memory Management

Lecture 4: Memory Management 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 waiting to be brought into

### Chapter 9: Virtual-Memory Management

Chapter 9: Virtual-Memory Management Chapter 9: Virtual-Memory Management Background Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing Memory-Mapped Files Allocating Kernel Memory

### Chapter 9: Virtual-Memory Management. Operating System Concepts with Java 8 th Edition

Chapter 9: Virtual-Memory Management Operating System Concepts with Java 8 th Edition 9.1 Silberschatz, Galvin and Gagne 2009 Chapter 9: Virtual Memory Background Demand Paging Copy-on-Write Page Replacement

### Chapter 9: Virtual Memory

Chapter 9: Virtual Memory Chapter 9: Virtual Memory Background Demand Paging Process Creation Page Replacement Allocation of Frames Thrashing Demand Segmentation Operating System Examples 9.2 Background

### Chapter 9 Virtual-Memory Management. Operating System Concepts Essentials 9 th Edition

Chapter 9 Virtual-Memory Management Silberschatz, Galvin and Gagne 2013 Chapter 9: Virtual-Memory Management Background Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing Memory-Mapped

### Virtual Memory (Ch.10)

Virtual Memory (Ch.10)! Background! Demand Paging! Page Faults! Page Replacement! Page Replacement Algorithms! Thrashing! Strategies for Thrashing Prevention Silberschatz / OS Concepts / 6e - Chapter 10

### Chapter 9: Virtual Memory. Operating System Concepts 9 th Edition

Chapter 9: Virtual Memory Silberschatz, Galvin and Gagne 2013 Chapter 9: Virtual Memory Background Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing Memory-Mapped Files Allocating

### OPERATING SYSTEM - VIRTUAL MEMORY

OPERATING SYSTEM - VIRTUAL MEMORY http://www.tutorialspoint.com/operating_system/os_virtual_memory.htm Copyright tutorialspoint.com A computer can address more memory than the amount physically installed

### Performance Example memory access time = 100 nanoseconds swap fault overhead = 25 msec page fault rate = 1/1000 EAT = (1-p) * p * (25 msec)

Memory Management Outline Operating Systems Processes Memory Management Basic Paging Virtual memory Virtual Memory Motivation Demand Paging Logical address space larger than physical memory Virtual Memory

### Operating Systems. Memory Management. Lecture 9 Michael O Boyle

Operating Systems Memory Management Lecture 9 Michael O Boyle 1 Chapter 8: Memory Management Background Logical/Virtual Address Space vs Physical Address Space Swapping Contiguous Memory Allocation Segmentation

CHAPTER 9 Virtual memory can be a very interesting subject since it has so many different aspects: page faults, managing the backing store, page replacement, frame allocation, thrashing, page size. The

### CS5460: Operating Systems Lecture 16: Page Replacement (Ch. 9)

CS5460: Operating Systems Lecture 16: Page Replacement (Ch. 9) Last Time: Demand Paging Key idea: RAM is used as a cache for disk Don t give a process a page of RAM until it is needed When running short

### Lecture 13: Thrashing

Lecture 13: Thrashing Thrashing: exposing the lie of VM Thrashing: processes on system require more memory than it has. P1 P2 P3 Real mem Each time one page is brought in, another page, whose contents

### Lesson 6: Memory Management & Virtualization

Lesson 6: Memory Management & Virtualization Contents Dynamic allocation, Memory fragmentation Paging Address translation with paging Paging hardware Page table structures Segmentation Virtual memory background

### SUBJECT CODE /NAME : CS6401 OPERATING SYSTEMS YEAR/SEM: II/04 QUESTION BANK

SUBJECT CODE /NAME : CS6401 OPERATING SYSTEMS YEAR/SEM: II/04 QUESTION BANK Unit-I OPERATING SYSTEMS OVERVIEW 1. Differentiate between tightly coupled systems and loosely coupled systems. 2. Define OS

### CHAPTER 8 : VIRTUAL MEMORY. Introduction

CHAPTER 8 : VIRTUAL MEMORY Introduction In simple paging and segmentation, we realised that we can : Load program pages or segments into frames that may not necessarily be contigous. Make memory address

### Chapter 9: Virtual Memory

Chapter 9: Virtual Memory Silberschatz, Galvin and Gagne 2013! Chapter 9: Virtual Memory Background" Demand Paging" Copy-on-Write" Page Replacement" Allocation of Frames " Thrashing" Memory-Mapped Files"

### LOGICAL AND PHYSICAL ORGANIZATION MEMORY MANAGEMENT TECHNIQUES (CONT D)

MEMORY MANAGEMENT Requirements: Relocation (to different memory areas) Protection (run time, usually implemented together with relocation) Sharing (and also protection) Logical organization Physical organization

### 7. Memory Management

Lecture Notes for CS347: Operating Systems Mythili Vutukuru, Department of Computer Science and Engineering, IIT Bombay 7. Memory Management 7.1 Basics of Memory Management What does main memory (RAM)

### Page Replacement Strategies. Jay Kothari Maxim Shevertalov CS 370: Operating Systems (Summer 2008)

Page Replacement Strategies Jay Kothari (jayk@drexel.edu) Maxim Shevertalov (max@drexel.edu) CS 370: Operating Systems (Summer 2008) Page Replacement Policies Why do we care about Replacement Policy? Replacement

### Chapter 9: Virtual Memory. Operating System Concepts 8 th Edition,

Chapter 9: Virtual Memory, Silberschatz, Galvin and Gagne 2009 Chapter 9: Virtual Memory Background Demand Paging Page Replacement Thrashing 9.2 Silberschatz, Galvin and Gagne 2009 Objectives To describe

### Operating Systems Memory Management

Operating Systems Memory Management ECE 344 ECE 344 Operating Systems 1 Memory Management Contiguous Memory Allocation Paged Memory Management Virtual Memory ECE 344 Operating Systems 2 Binding of Instructions

### CSE 120 Principles of Operating Systems

CSE 120 Principles of Operating Systems Fall 2004 Lecture 11: Page Replacement Geoffrey M. Voelker Memory Management Last lecture on memory management: Goals of memory management To provide a convenient

### Memory Management. Overview

Memory Management 1 Overview Basic memory management Address Spaces Virtual memory Page replacement algorithms Design issues for paging systems Implementation issues Segmentation 2 1 Memory Management

### Memory Management. Prof. P.C.P. Bhatt. P.C.P Bhat OS/M4/V1/2004 1

Memory Management Prof. P.C.P. Bhatt P.C.P Bhat OS/M4/V1/2004 1 What is a Von-Neumann Architecture? Von Neumann computing requires a program to reside in main memory to run. Motivation The main motivation

### CS 134: Operating Systems

CS 134: Operating Systems Memory Fun with Paging CS 134: Operating Systems Memory Fun with Paging 1 / 37 Overview Cost of Faults Overview Overview Cost of Faults Algorithms Easy Approaches Realistic Approaches

### Goals of memory management. Today s desktop and server systems. Tools of memory management. A trip down Memory Lane

Goals of memory management CSE 451: Operating Systems Spring 212 Module 11 Memory Management Allocate memory resources among competing processes, maximizing memory utilization and system throughput Provide

### csci 3411: Operating Systems

csci 3411: Operating Systems Virtual Memory II Gabriel Parmer Slides adapted from Silberschatz and West Caching Registers Cache Memory/ RAM Virtual Memory Registers Cache Memory/ RAM Disk Page Replacement

### PROCESS VIRTUAL MEMORY. CS124 Operating Systems Winter , Lecture 18

PROCESS VIRTUAL MEMORY CS124 Operating Systems Winter 2013-2014, Lecture 18 2 Programs and Memory Programs perform many interactions with memory Accessing variables stored at specific memory locations

OPERATING SYSTEMS IIIT-Hyderabad OVERVIEW Introduction What is an OS/Kernel? Bootstrap program Interrupts and exceptions Volatile and Non volatile storage!!! Process Management What is a process/system

### Memory Management. memory hierarchy

Memory Management Ideally programmers want memory that is large fast non volatile Memory hierarchy small amount of fast, expensive memory cache some medium-speed, medium price main memory gigabytes of

### Operating Systems Part M15 Virtual Memory, Shared Libraries, Microkernels, Sandboxing and Virtualization. Florina Ciorba 24 November 2015

Operating Systems Part M15 Virtual Memory, Shared Libraries, Microkernels, Sandboxing and Virtualization Florina Ciorba 24 November 2015 Today s Overview (Main) Memory management Shared libraries Compiling,

### Silberschatz and Galvin Chapter 9

Silberschatz and Galvin Chapter 9 Virtual Memory CPSC Richard Furuta /6/99 Virtual memory Virtual memory permits the execution of processes that are not entirely in physical memory Programmer benefits

### Operating Systems, 6 th ed. Test Bank Chapter 7

True / False Questions: Chapter 7 Memory Management 1. T / F In a multiprogramming system, main memory is divided into multiple sections: one for the operating system (resident monitor, kernel) and one

### Virtual Memory: Demand Paging and Page Replacement

Virtual Memory: Demand Paging and Page Replacement Problems that remain to be solved: Even with 8K page size, number of pages /process is very large. Can t afford to keep the entire page table for a process

### Memory Management and Paging. CSCI 3753 Operating Systems Spring 2005 Prof. Rick Han

Memory Management and Paging CSCI 3753 Operating Systems Spring 2005 Prof. Rick Han Announcements PA #2 due Friday March 18 11:55 pm - note extension of a day Read chapters 11 and 12 From last time...

### PROJECT REPORT MEMORY MANAGEMENT DATE :

PROJECT REPORT MEMORY MANAGEMENT DATE : GROUP MEMBERS: MEMORY MANAGEMENT PURPOSE: To simulate memory management of a simple system in order to better comprehend the complex memory management system of

### Virtual Memory. 4.1 Demand Paging

Chapter 4 Virtual Memory All the memory management policies we have discussed so far, try to keep a number of processes in the memory simultaneously to allow multiprogramming. But they require an entire

### CS 31: Intro to Systems Virtual Memory. Kevin Webb Swarthmore College April 7, 2015

CS 31: Intro to Systems Virtual Memory Kevin Webb Swarthmore College April 7, 2015 Reading Quiz Memory Abstraction goal: make every process think it has the same memory layout. MUCH simpler for compiler

### Section I Section Real Time Systems. Processes. 1.7 Memory Management. (Textbook: A. S. Tanenbaum Modern OS - ch. 3) Memory Management Introduction

EE206: Software Engineering IV 1.7 Memory Management page 1 of 28 Section I Section Real Time Systems. Processes 1.7 Memory Management (Textbook: A. S. Tanenbaum Modern OS - ch. 3) Memory Management Introduction

### Chapter 3 Memory Management: Virtual Memory

Understanding Operating Systems, Fifth Edition 3-1 Chapter 3 Memory Management: Virtual Memory At a Glance Instructor s Manual Table of Contents Overview Objectives s Quick Quizzes Class Discussion Topics

### Page replacement algorithms OS

Page replacement algorithms 1 When a page fault occurs 2 OS has to choose a page to evict from memory If the page has been modified, the OS has to schedule a disk write of the page The page just read overwrites

### Agenda. Memory Management. Binding of Instructions and Data to Memory. Background. CSCI 444/544 Operating Systems Fall 2008

Agenda Background Memory Management CSCI 444/544 Operating Systems Fall 2008 Address space Static vs Dynamic allocation Contiguous vs non-contiguous allocation Background Program must be brought into memory

### J.B. INSTITUTE OF TECHNOLOGY,DEHRAUDN

J.B. INSTITUTE OF TECHNOLOGY,DEHRAUDN Question Bank Subject Name: Operating system Subject Code: (TCS 601) Department: CS/IT Faculty Name: Kapil Joshi Year/Sem: 3 rd /6 th Designation: A.P Answer the following

### Memory Management. Main memory Virtual memory

Memory Management Main memory Virtual memory Main memory Background (1) Processes need to share memory Instruction execution cycle leads to a stream of memory addresses Basic hardware CPU can only access

### CSC501 Operating Systems Principles. Memory Management

CSC501 Operating Systems Principles Memory Management 1 Previous Lecture q Memory Management Q Segmentation Q Paging q Today s Lecture Q Lab 3 Q Page replacement algorithms Lab 3 : Demand Paging q Goal:

### 15 Demand Paging, Thrashing, Working Sets

70 15 Demand Paging, Thrashing, Working Sets Readings for this topic: Siberschatz/Galvin, chapter 9 So far we have separated the programmer s view of memory from the system s view using a mapping mechanism.

### Objectives and Functions

Objectives and Functions William Stallings Computer Organization and Architecture 6 th Edition Week 10 Operating System Support Convenience Making the computer easier to use Efficiency Allowing better

### CSE 380 Computer Operating Systems. Instructor: Insup Lee. University of Pennsylvania, Fall 2002 Lecture Note: Memory Management.

CSE 380 Computer Operating Systems Instructor: Insup Lee University of Pennsylvania, Fall 2002 Lecture Note: Memory Management 1 Memory Management q The memory management portion of the Operating System

### Chapter 10: Virtual Memory. Lesson 08: Demand Paging and Page Swapping

Chapter 10: Virtual Memory Lesson 08: Demand Paging and Page Swapping Objective Learn demand paging, pages of data are only brought into the main memory when a program accesses them Learn swapping technique

### William Stallings Computer Organization and Architecture

William Stallings Computer Organization and Architecture Chapter 8 Operating System Support Rev. 3.2 (2009-10) by Enrico Nardelli 8-1 Objectives and Functions Convenience Making the computer easier to

### CSI3131 Operating Systems Tutorial 8 Winter 2015 Virtual Memory

CSI11 Operating Systems Tutorial 8 Winter 015 Virtual Memory 1. Provide a short definition for each of the following terms: Page fault: Resident Set Working Set:. Describe how thrashing can occur in using

### Operating Systems. Virtual Memory

Operating Systems Virtual Memory Virtual Memory Topics. Memory Hierarchy. Why Virtual Memory. Virtual Memory Issues. Virtual Memory Solutions. Locality of Reference. Virtual Memory with Segmentation. Page

### Why Computers Are Getting Slower (and what we can do about it) Rik van Riel Sr. Software Engineer, Red Hat

Why Computers Are Getting Slower (and what we can do about it) Rik van Riel Sr. Software Engineer, Red Hat Why Computers Are Getting Slower The traditional approach better performance Why computers are

### Topics. Caches and Virtual Memory. Cache Operations. Cache Operations. Write Policies on Cache Hit. Read and Write Policies.

Topics Caches and Virtual Memory CS 333 Fall 2006 Cache Operations Placement strategy Replacement strategy Read and write policy Virtual Memory Why? General overview Lots of terminology Cache Operations

### VALLIAMMAI ENGINEERING COLLEGE

VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur-603203 DEPARTMENT OF INFORMATION TECHNOLOGY Academic Year: 205-6 QUESTION BANK - EVEN SEMESTER NAME OF THE SUBJECT SUBJECT CODE SEMESTER YEAR DEPARTMENT

### GOJAN SCHOOL OF BUSINESS AND TECHNOLOGY DEPARTMENT OF INFORMATION TECHNOLOGY CS2411-OPERATING SYSTEM QUESTION BANK UNIT-I (PROCESSES AND THREADS)

GOJAN SCHOOL OF BUSINESS AND TECHNOLOGY DEPARTMENT OF INFORMATION TECHNOLOGY CS2411-OPERATING SYSTEM QUESTION BANK UNIT-I (PROCESSES AND THREADS) 1. What is an Operating system? What are the various OS

### CH 7. MAIN MEMORY. Base and Limit Registers. Memory-Management Unit (MMU) Chapter 7: Memory Management. Background. Logical vs. Physical Address Space

Chapter 7: Memory Management CH 7. MAIN MEMORY Background Swapping Contiguous Memory Allocation Paging Structure of the Page Table Segmentation adapted from textbook slides Background Base and Limit Registers

### Memory Management. Operating Systems. Monoprogramming without Swapping or Paging. Multiprogramming

Operating Systems User OS Kernel & Device Drivers Interface Programs Management Management is an important resource that needs to be managed by the OS manager is the component of the OS responsible for

### Topic 14: Virtual Memory, Demand Paging, and Working Sets

CS 414 : Operating Systems UNIVERSITY OF VIRGINIA Department of Computer Science Fall 2005 Topic 14: Virtual Memory, Demand Paging, and Working Sets Readings for this topic: Ch.9 Separation of the programmer

### Memory Management. Yücel Saygın. These slides are based on your text book and on the slides prepared by Andrew S. Tanenbaum

Memory Management Yücel Saygın These slides are based on your text book and on the slides prepared by Andrew S. Tanenbaum 1 Memory Management Ideally programmers want memory that is large fast non volatile

### Operating Systems Fall 2014 Virtual Memory, Page Faults, Demand Paging, and Page Replacement. Myungjin Lee

Operating Systems Fall 2014 Virtual Memory, Page Faults, Demand Paging, and Page Replacement Myungjin Lee myungjin.lee@ed.ac.uk 1 Reminder: Mechanics of address translation virtual address virtual page

### ICS Principles of Operating Systems

ICS 143 - Principles of Operating Systems Operating Systems - Review of content from midterm to final Prof. Ardalan Amiri Sani Prof. Nalini Venkatasubramanian ardalan@uci.edu nalini@ics.uci.edu Deadlocks

### Operating Systems. III. Scheduling. http://soc.eurecom.fr/os/

Operating Systems Institut Mines-Telecom III. Scheduling Ludovic Apvrille ludovic.apvrille@telecom-paristech.fr Eurecom, office 470 http://soc.eurecom.fr/os/ Outline Basics of Scheduling Definitions Switching

### Memory Management. Today. Next Time. ! Basic memory management! Swapping! Kernel memory allocation. ! Virtual memory

Memory Management Today! Basic memory management! Swapping! Kernel memory allocation Next Time! Virtual memory Memory management! Ideal memory for a programmer Large Fast Non volatile Cheap! Nothing like

### File System Implementation II

Introduction to Operating Systems File System Implementation II Performance, Recovery, Network File System John Franco Electrical Engineering and Computing Systems University of Cincinnati Review Block

### Chapter 12. Paging an Virtual Memory Systems

Chapter 12 Paging an Virtual Memory Systems Paging & Virtual Memory Virtual Memory - giving the illusion of more physical memory than there really is (via demand paging) Pure Paging - The total program

### III. Memory Management, Virtual Memory

TDIU25: Operating Systems III. Memory Management, Virtual Memory SGG9: chapters 8 and 9 o Memory management: o contiguous allocation, fragmentation, segmentation, paging o Virtual memory: o demand paging,

### Operating Systems (1DT020 & 1TT802) Lecture 10 Memory Management: Demand paging & page replacement. File system: Interface.

Operating Systems (1DT020 & 1TT802) Lecture 10 Memory Management: Demand paging & page replacement File system: Interface May 07, 2008 Léon Mugwaneza http://www.it.uu.se/edu/course/homepage/os/vt08 Goals

### Windows Server Performance Monitoring

Spot server problems before they are noticed The system s really slow today! How often have you heard that? Finding the solution isn t so easy. The obvious questions to ask are why is it running slowly

### KVM & Memory Management Updates

KVM & Memory Management Updates KVM Forum 2012 Rik van Riel Red Hat, Inc. KVM & Memory Management Updates EPT Accessed & Dirty Bits 1GB hugepages Balloon vs. Transparent Huge Pages Automatic NUMA Placement

### If a process does not have enough pages, the page-fault rate is very high. This leads to:

Thrashing If a process does not have enough pages, the page-fault rate is very high. This leads to: low CPU utilization operating system thinks that it needs to increase the degree of multiprogramming

### Last Class: Introduction to Operating Systems. Today: OS and Computer Architecture

Last Class: Introduction to Operating Systems User apps OS Virtual machine interface hardware physical machine interface An operating system is the interface between the user and the architecture. History

### Sri vidya College of Engineering & Technology, Virudhunagar. CS6401- Operating System QUESTION BANK UNIT-IV

Part-A QUESTION BANK UNIT-IV 1. What is a File? A file is a named collection of related information that is recorded on secondary storage. A file contains either programs or data. A file has certain structure

### 4 Main Memory Management

4 Main Memory Management 4.1 Introduction A large part of the OS s responsibility is organising main memory for processes. GOAL pack as many processes into memory as possible so that the processor will

### CS 377: Operating Systems. Outline. A review of what you ve learned, and how it applies to a real operating system. Lecture 25 - Linux Case Study

CS 377: Operating Systems Lecture 25 - Linux Case Study Guest Lecturer: Tim Wood Outline Linux History Design Principles System Overview Process Scheduling Memory Management File Systems A review of what

µ-kernels Advantages The idea of µ-kernel is to minimize the kernel. I.e. to implement outside the kernel whatever possible. The µ-kernel concept is very old: Brinch Hansen s (1970) and Hydra (1974) Fault

### Lecture 17: Virtual Memory II. Goals of virtual memory

Lecture 17: Virtual Memory II Last Lecture: Introduction to virtual memory Today Review and continue virtual memory discussion Lecture 17 1 Goals of virtual memory Make it appear as if each process has: