Memory Management (continued) May 8, 2000 Instructor: Gary Kimura.

Slides:



Advertisements
Similar presentations
Paging: Design Issues. Readings r Silbershatz et al: ,
Advertisements

Part IV: Memory Management
Liu Meihua Chapter 3 Memory management Chapter 3 Memory management —— 3.5 Kernel Memory.
Virtual Memory Operating System Concepts chapter 9 CS 355
Chapter 101 Cleaning Policy When should a modified page be written out to disk?  Demand cleaning write page out only when its frame has been selected.
Segmentation and Paging Considerations
Chapter 10 Operating Systems.
© Neeraj Suri EU-NSF ICT March 2006 Budapesti Műszaki és Gazdaságtudományi Egyetem Méréstechnika és Információs Rendszerek Tanszék Zoltán Micskei
Mobile Handset Memory Management
Memory Management Design & Implementation Segmentation Chapter 4.
Memory Management (II)
Virtual Memory Chapter 8. Hardware and Control Structures Memory references are dynamically translated into physical addresses at run time –A process.
CS 333 Introduction to Operating Systems Class 18 - File System Performance Jonathan Walpole Computer Science Portland State University.
Memory Management 2010.
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 Chapter 5.
Chapter 5: Memory Management Dhamdhere: Operating Systems— A Concept-Based Approach Slide No: 1 Copyright ©2005 Memory Management Chapter 5.
OPERATING SYSTEMS Introduction
File System Variations and Software Caching May 19, 2000 Instructor: Gary Kimura.
Memory Management April 28, 2000 Instructor: Gary Kimura.
I/O Systems and Storage Systems May 22, 2000 Instructor: Gary Kimura.
CSE451 Introduction to Operating Systems Spring 2007 Module 12 Memory Management Hardware Support Gary Kimura & Mark Zbikowski April 27, 2007.
Chapter 91 Memory Management Chapter 9   Review of process from source to executable (linking, loading, addressing)   General discussion of memory.
Windows 2000 Memory Management Computing Department, Lancaster University, UK.
Chapter 3 Memory Management: Virtual Memory
Dr Damitha Karunaratna University of Colombo school of computing
Page 19/17/2015 CSE 30341: Operating Systems Principles Optimal Algorithm  Replace page that will not be used for longest period of time  Used for measuring.
MEMORY MANAGEMENT Presented By:- Lect. Puneet Gupta G.P.C.G. Patiala.
Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems CSCI-6140 – Computer Operating Systems David Goldschmidt, Ph.D.
CS 346 – Chapter 1 Operating system – definition Responsibilities What we find in computer systems Review of –Instruction execution –Compile – link – load.
Chapter 9: Virtual Memory Background Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing Memory-Mapped Files Allocating Kernel.
Chapter 8 – Main Memory (Pgs ). Overview  Everything to do with memory is complicated by the fact that more than 1 program can be in memory.
Chapter 7 Operating Systems. Define the purpose and functions of an operating system. Understand the components of an operating system. Understand the.
Memory Management Fundamentals Virtual Memory. Outline Introduction Motivation for virtual memory Paging – general concepts –Principle of locality, demand.
Lecture 11 Page 1 CS 111 Online Working Sets Give each running process an allocation of page frames matched to its needs How do we know what its needs.
CS333 Intro to Operating Systems Jonathan Walpole.
Processes and Virtual Memory
ICOM Noack Memory management Virtual memory Paging and segmentation Demand paging Memory management hardware.
Virtual Memory – Managing Physical Memory
Memory Management OS Fazal Rehman Shamil. swapping Swapping concept comes in terms of process scheduling. Swapping is basically implemented by Medium.
4P13 Week 9 Talking Points
COMP091 – Operating Systems 1 Memory Management. Memory Management Terms Physical address –Actual address as seen by memory unit Logical address –Address.
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 2: The Linux System Part 4.
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 9: Virtual Memory.
CS 3204 Operating Systems Godmar Back Lecture 18.
Virtual Memory.
Kernel Design & Implementation
Chapter 2: The Linux System Part 4
OPERATING SYSTEM CONCEPTS AND PRACTISE
Jonathan Walpole Computer Science Portland State University
CSE451 Memory Management Continued Autumn 2002
Chapter 8: Main Memory.
Memory Caches & TLB Virtual Memory
Partitioned Memory Allocation
Paging COMP 755.
Chapter 9: Virtual Memory
CSE451 NTFS Variations and other File System Issues Autumn 2002
Swapping Segmented paging allows us to have non-contiguous allocations
CSI 400/500 Operating Systems Spring 2009
Economics, Administration & Information system
CSCE 313 – Introduction to UNIx process
Chapter 2: Operating-System Structures
Memory management Explain how memory is managed in a typical modern computer system (virtual memory, paging and segmentation should be described.
Contents Memory types & memory hierarchy Virtual memory (VM)
CSE451 Virtual Memory Paging Autumn 2002
Virtual Memory: Working Sets
Virtual Memory: Policies (Part II)
Chapter 2: Operating-System Structures
Chapter 8 & 9 Main Memory and Virtual Memory
Presentation transcript:

Memory Management (continued) May 8, 2000 Instructor: Gary Kimura

26/26/2015 Today’s Topics How does the free page list get replenished? What do we do with dirty pages? Thrashing What parts of the operating system always needs to be resident in physical memory? What about allocating memory in smaller units than a page

36/26/2015 Memory Management Page States and Lists MM maintains a list of physical pages according to the following attributes (various implementations use slightly different lists) –Zeroed pages –Free pages –Standby pages –Modified pages –Modified No Write pages –Bad pages MM’s goal is to use these pages on these lists to supply memory to the system

46/26/2015 Making free pages When a process exits it pages are freed When a process gets its “working set” reduced some pages are freed When a processes deallocates memory its pages are freed One special characteristic about “currently used” pages is that some are “clean” and some are “dirty”

56/26/2015 Dirty pages Dirty or modified pages need to be written out before the frame can be freed We can write out a dirty page just before the page is freed –This minimizes the number of writes we need to do –This also means that making a free page might take a while longer Or we can periodically write out dirty pages –There can be a “modified page writer” process in the system that sweeps through writing out modified pages –Picking when to write a page can be a problem, because writing too often is bad

66/26/2015 Thrashing Thrashing is when the system is so busy reading and writing page frames that the effective system throughput is getting close to zero. Overstressed systems exhibit this behavior Part of testing a commercial system is to load it up to capacity and fix what breaks Some techniques to avoid thrashing is to simply limit the number of processes that can exist at a given time. –Other limits are possible and useful (opened files, logged on users, etc)

76/26/2015 Paged and non paged memory Some data and code must always be in memory (also called resident) –All of the kernel, all the time? Paged memory has a copy in backing store and can be discarded from main memory and brought back in with only a performance penalty Nonpaged memory for various reasons cannot be discarded and brought back in. –Sometimes the code/data must always be resident to run the system (e.g., the code that does the actual backing store support) –Sometimes the code/data is “pinned” in memory for a device driver to access for DMA purposes –Sometimes code is pinned in for performance reasons

86/26/2015 How much to page There is a chicken and egg problem of making sure that the code & data necessary to page-in non- resident data is itself in memory. My laptop running NT has 13MB of code and 28MB of data, but only 3MB of code and 4MB of data is permanently in memory.

96/26/2015 Sub page allocation The basic allocation granularity for the system is a physical page. So what does a system programmer do to get smaller allocations (e.g., a malloc of 32 bytes)? –There needs to be a sub-page memory allocator used to allocate either paged of non-paged memory in the kernel. This is similar to user mode heap but with some additional requirements –Paged versus non-paged Basically there needs to be an allocate and a free function. –In NT this is called the kernel pool allocator Fragmentation is still an issue

106/26/2015 Still to come File systems I/O systems Software File Caching Distributed systems Security and administration

116/26/2015 Reading Start reading chapters 10 and 11 Rating scale 1 = unlikely quiz material, 5 likely quiz material SectionRatingSectionRating