CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11:30 - 12:30 AM.

Slides:



Advertisements
Similar presentations
Chapter 4 Memory Management Basic memory management Swapping
Advertisements

9.4 Page Replacement What if there is no free frame?
CS 241 Spring 2007 System Programming 1 Memory Replacement Policies Lecture 32 Klara Nahrstedt.
Page Replacement Algorithms
Cache and Virtual Memory Replacement Algorithms
Chapter 3.3 : OS Policies for Virtual Memory
Virtual Memory 3 Fred Kuhns
Module 10: Virtual Memory
Chapter 10: Virtual Memory
Virtual Memory II Chapter 8.
Scribe for 7 th April 2014 Page Replacement Algorithms Payal Priyadarshini 11CS30023.
Chapter 4 Memory Management Page Replacement 补充:什么叫页面抖动?
Chapter 9 Virtual Memory Bernard Chen 2007 Spring.
Virtual Memory Management G. Anuradha Ref:- Galvin.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 10: Virtual Memory Background Demand Paging Process Creation Page Replacement.
Module 9: Virtual Memory
CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11: :30 AM.
Lecture 34: Chapter 5 Today’s topic –Virtual Memories 1.
COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 5:00-6:00 PM.
Chapter 101 Virtual Memory Chapter 10 Sections and plus (Skip:10.3.2, 10.7, rest of 10.8)
03/26/2010CSCI 315 Operating Systems Design1 Virtual Memory Notice: The slides for this lecture have been largely based on those accompanying an earlier.
Chapter 9: Virtual Memory. 9.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 22, 2005 Chapter 9: Virtual Memory Background.
Instructor: Umar KalimNUST Institute of Information Technology Operating Systems Revisiting Virtual Memory.
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.
CS444/CS544 Operating Systems Virtual Memory 4/06/2007 Prof. Searleman
1 Virtual Memory Management B.Ramamurthy Chapter 10.
OS Spring’04 Virtual Memory: Page Replacement Operating Systems Spring 2004.
03/29/2004CSCI 315 Operating Systems Design1 Page Replacement Algorithms (Virtual Memory)
CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11: :30 AM.
CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11: :30 AM.
Operating Systems CMPSC 473 Virtual Memory Management (3) November – Lecture 20 Instructor: Bhuvan Urgaonkar.
By Andrew Yee. Virtual Memory Memory Management What is Page Replacement?
COT 4600 Operating Systems Fall 2009 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 3:00-4:00 PM.
Virtual Memory. Background Virtual memory is a technique that allows execution of processes that may not be completely in the physical memory. Virtual.
Virtual Memory The memory space of a process is normally divided into blocks that are either pages or segments. Virtual memory management takes.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts Essentials – 9 th Edition Chapter 9: Virtual-Memory Management.
Memory Management & Virtual Memory © Dr. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada.
Silberschatz, Galvin and Gagne  Operating System Concepts Virtual Memory Virtual memory – separation of user logical memory from physical memory.
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.
1 Chapter 10: Virtual Memory Background Demand Paging Process Creation Page Replacement Allocation of Frames Thrashing Operating System Examples (not covered.
10.1 Chapter 10: Virtual Memory Background Demand Paging Process Creation Page Replacement Allocation of Frames Thrashing Operating System Examples.
CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11: :30 AM.
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 9: Virtual Memory.
COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 5:00-6:00 PM.
COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 5:00-6:00 PM.
Chapter 9: Virtual Memory. 9.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Background Virtual memory – separation of user logical memory.
Chapter 9: Virtual Memory – Part I
Module 9: Virtual Memory
Chapter 9: Virtual-Memory Management
COT 4600 Operating Systems Fall 2009
COP 5611 Operating Systems Spring 2010
COT 4600 Operating Systems Spring 2011
CGS 3763 Operating Systems Concepts Spring 2013
CGS 3763 Operating Systems Concepts Spring 2013
Lecture 39 Syed Mansoor Sarwar
5: Virtual Memory Background Demand Paging
CGS 3763 Operating Systems Concepts Spring 2013
CGS 3763 Operating Systems Concepts Spring 2013
COT 4600 Operating Systems Spring 2011
COP 5611 Operating Systems Spring 2010
Operating Systems CMPSC 473
Exercise (11).
Exercise (10).
Jazan University, Jazan KSA
Module IV Memory Organization.
Operating Systems Concepts
Module 9: Virtual Memory
CGS 3763 Operating Systems Concepts Spring 2013
Virtual Memory.
Presentation transcript:

CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11: :30 AM

Last time: Problem solving – Dynamic Address Translation Today Page replacement algorithms Next time Virtual memory Reading assignments Chapters 8 and 9 of the textbook Lecture 36 – Friday, April 12, 2013 Lecture 362

Page replacement Lecture 363

Page Replacement Algorithms Want lowest page-fault rate Evaluate algorithm by running it on a particular string of memory references (reference string) and computing the number of page faults on that string In all our examples, the reference string is 1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5 Lecture 364

Page replacement policies; Beladys anomaly In the following examples we use a given string of references to illustrate several page replacement policies. We consider a primary device (main memory) with a capacity of three or four blocks and a secondary device (the disk) where a replica of all pages reside. Once a block has the dirty bit on it means that the page residing in that block was modifies and must be written back to the secondary device before being replaced. The capacity of the primary device is important. One expects that increasing the capacity, in our case the number of blocs in RAM leads to a higher hit ratio. That is not always the case as our examples will show. This is the Beladys anomaly. Note: different results are obtained with a different string of references!! Lecture 365

Time intervals Total number of page faults Reference string Block 1 in PS Block 2 in PS Block 3 in PS Page OUT Page IN Block 1 in PS Block 2 in PS Bloch 3 in PS Block 4 in PS Page OUT Page IN FIFO Page replacement algorithm PS: Primary storage Lecture 366

Time intervals Total number of page faults Reference string Block 1 in PS Block 2 in PS Block 3 in PS Page OUT Page IN Block 1 in PS Block 2 in PS Bloch 3 in PS Block 4 in PS Page OUT Page IN OPTIMAL page replacement algorithm Lecture 367

Time intervals Total number of page faults Reference string Block 1 in PS Block 2 in PS Block 3 in PS Page OUT Page IN Block 1 in PS Block 2 in PS Bloch 3 in PS Block 4 in PS Page OUT Page IN LRU page replacement algorithm Lecture 368

LRU, OPTIMAL, MRU LRU looks only at history OPTIMAL knows not only the history but also the future. In some particular cases Most Recently Used Algorithm performs better than LRU. Example: primary device with 4 cells. Reference string LRU F F F F F F F F F F F F F F F MRU F F F F F F - - Lecture 369

Time intervals Total number of page faults Reference string Block 1 in PS Block 2 in PS Block 3 in PS Page OUT Page IN Block 1 in PS Block 2 in PS Bloch 3 in PS Block 4 in PS Page OUT Page IN The OPTIMAL replacement policy keeps in the 3-blocks primary memory the same pages as it does in case of the 4-block primary memory. Lecture 3610

Time intervals Total number of page faults Reference string Block 1 in PS Block 2 in PS Block 3 in PS Page OUT Page IN Block 1 in PS Block 2 in PS Bloch 3 in PS Block 4 in PS Page OUT Page IN The FIFO replacement policy does not keep in the 3-blocks primary memory the same pages as it does in case of the 4-block primary memory. Lecture 3611

Time intervals Total number of page faults Reference string Block 1 in PS Block 2 in PS Block 3 in PS Page OUT Page IN Block 1 in PS Block 2 in PS Bloch 3 in PS Block 4 in PS Page OUT Page IN The LRU replacement policy keeps in the 3-blocks primary memory the same pages as it does in case of the 4-block primary memory. Lecture 3612

Time intervals Total number of page faults Reference string Block 1 in PS Block 2 in PS Block 3 in PS Page OUT Page IN Block 1 in PS Block 2 in PS Bloch 3 in PS Block 4 in PS Page OUT Page IN The FIFO replacement policy does not keep in the 3-blocks primary memory the same pages as it does in case of the 4-block primary memory Lecture 3613