Homework Assignment #3 J. H. Wang Nov. 19, 2009. Homework #3 Chap.7: 7.5, 7.10 Chap.8: 8.6, 8.10 Chap.9: 9.3, 9.6 Due: two weeks (Dec. 3, 2009)

Slides:



Advertisements
Similar presentations
Background Virtual memory – separation of user logical memory from physical memory. Only part of the program needs to be in memory for execution. Logical.
Advertisements

Chapter 9: Virtual Memory
Scribe for 7 th April 2014 Page Replacement Algorithms Payal Priyadarshini 11CS30023.
Chapter 6: Memory Management
Virtual Memory Management G. Anuradha Ref:- Galvin.
Allocation of Frames Each process needs minimum number of pages
9.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Virtual Memory OSC: Chapter 9. Demand Paging Copy-on-Write Page Replacement.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Lecture 15: Background Information for the VMWare ESX Memory Management.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 10: Virtual Memory Background Demand Paging Process Creation Page Replacement.
Module 9: Virtual Memory
Module 10: Virtual Memory Background Demand Paging Performance of Demand Paging Page Replacement Page-Replacement Algorithms Allocation of Frames Thrashing.
Virtual Memory Background Demand Paging Performance of Demand Paging
Virtual Memory Introduction to Operating Systems: Module 9.
Instructor: Umar KalimNUST Institute of Information Technology Operating Systems Virtual Memory.
Memory Problems Prof. Sin-Min Lee Department of Mathematics and Computer Sciences.
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.
Chapter 10: Virtual Memory. 9.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 22, 2005 Chapter 10: Virtual Memory.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 9: Virtual Memory.
03/22/2004CSCI 315 Operating Systems Design1 Virtual Memory Notice: The slides for this lecture have been largely based on those accompanying the textbook.
Virtual Memory Basic Concepts Demand Paging
03/17/2008CSCI 315 Operating Systems Design1 Virtual Memory Notice: The slides for this lecture have been largely based on those accompanying the textbook.
03/29/2004CSCI 315 Operating Systems Design1 Page Replacement Algorithms (Virtual Memory)
1 Tuesday, July 04, 2006 "Programs expand to fill the memory available to hold them." - Modified Parkinson’s Law.
Maninder Kaur VIRTUAL MEMORY 24-Nov
O RERATıNG S YSTEM LESSON 10 MEMORY MANAGEMENT II 1.
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 9: Virtual Memory.
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.
Part 8: Virtual Memory. Silberschatz, Galvin and Gagne ©2005 Virtual vs. Physical Address Space Each process has its own virtual address space, which.
Chapter 9: Virtual Memory Background Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing Memory-Mapped Files Allocating Kernel.
Computer Studies (AL) Memory Management Virtual Memory I.
Silberschatz, Galvin and Gagne Operating System Concepts Chapter 9: Virtual Memory.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Virtual Memory.
Operating Systems CMPSC 473 Virtual Memory Management (3) November – Lecture 20 Instructor: Bhuvan Urgaonkar.
Homework Assignment #2 J. H. Wang Oct. 17, 2007.
Operating Systems (CS 340 D) Princess Nora University Faculty of Computer & Information Systems Computer science Department.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts Essentials – 9 th Edition Chapter 9: Virtual-Memory Management.
Operating Systems (CS 340 D) Princess Nora University Faculty of Computer & Information Systems Computer science Department.
CS307 Operating Systems Virtual Memory Fan Wu Department of Computer Science and Engineering Shanghai Jiao Tong University Spring 2012.
Virtual Memory Various memory management techniques have been discussed. All these strategies have the same goal: to keep many processes in memory simultaneously.
Silberschatz, Galvin and Gagne  Operating System Concepts Virtual Memory Virtual memory – separation of user logical memory from physical memory.
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.
1 Chapter 10: Virtual Memory Background Demand Paging Process Creation Page Replacement Allocation of Frames Thrashing Operating System Examples (not covered.
Homework Assignment #3 J. H. Wang Dec. 5, 2007.
10.1 Chapter 10: Virtual Memory Background Demand Paging Process Creation Page Replacement Allocation of Frames Thrashing Operating System Examples.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 9: Virtual-Memory Management.
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.
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
Virtual Memory.
Virtual Memory CSSE 332 Operating Systems
Operating Systems, Summer Semester 2011
Operating Systems, Winter Semester 2011
Chapter 9: Virtual Memory – Part I
Chapter 9: Virtual Memory
Computer Architecture
Chapter 9: Virtual Memory
Module 9: Virtual Memory
ICS Principles of Operating Systems
5: Virtual Memory Background Demand Paging
Practical Session 8, Memory Management 2
Operating Systems CMPSC 473
Exercise (11).
Module IV Memory Organization.
Module IV Memory Organization.
BANKER’S ALGORITHM Prepared by, Prof
Module 9: Virtual Memory
Practical Session 9, Memory Management continues
Presentation transcript:

Homework Assignment #3 J. H. Wang Nov. 19, 2009

Homework #3 Chap.7: 7.5, 7.10 Chap.8: 8.6, 8.10 Chap.9: 9.3, 9.6 Due: two weeks (Dec. 3, 2009)

–7.5: In a real computer system, neither the resources available nor the demands of processes for resources are consistent over long periods (months). Resources break or are replaced, new processes come and go, new resources are bought and added to the system. If deadlock is controlled by the banker’s algorithm, which of the following changes can be made safely (without introducing the possibility of deadlock), and under what circumstances? (a) Increase Available (new resources added) (b) Decrease Availabl e (resource permanently removed from system) (c) Increase Max for one process (the process needs more resources than allowed, it may want more) (d) Decrease Max for one process (the process decides it does not need that many resources) (e) Increase the number of processes (f) Decrease the number of processes.

–7.10: Consider the following snapshot of a system : Allocation A B C D Max A B C D Available A B C D P P P P P

Answer the following questions using the banker’s algorithm : (a) What is the content of the matrix Need ? (b) Is the system in a safe state? (c) If a request from process P1 arrives for (0, 4, 2, 0), can the request be granted immediately?

–8.6: What is the purpose of paging the page tables? –8.10: Consider a paging system with the page table stored in memory. (a) If a memory reference takes 200 nanoseconds, how long does a paged memory reference take? (b) If we add TLBs, and 75 percent of all page-table references are found in the TLBs, what if the effective memory reference time? (Assume that finding a page-table entry in the TLBs takes zero time, if the entry is there.)

–9.3: A page-replacement algorithm should minimize the number of page faults. We can achieve this minimization by distributing heavily used pages evenly over all of memory, rather than having them compete for a small number of page frames. We can associate with each page frame a counter of the number pages associated with that frame. Then, to replace a page, we can search for the page frame with the smallest counter.

(a)Define a page-replacement algorithm using this basic idea. Specifically address these problems: i. What is the initial value of the counters? Ii. When are counters increased? Iii. When are counters decreased? Iv. How is the page to be replaced selected? (b)How many page faults occur for your algorithm for the following reference string with four page frames? 1, 2, 3, 4, 5, 3, 4, 1, 6, 7, 8, 7, 8, 9, 7, 8, 9, 5, 4, 5, 4, 2. (c)What is the minimum number of page faults for an optimal page-replacement strategy for the reference sting in part (b) with four page frames?

–9.6: Consider a demand-paging system with a paging disk that has an average access and transfer time of 20 milliseconds. Addresses are translated through a page table in main memory, with an access time of 1 microsecond per memory access. Thus, each memory reference through the page table takes two accesses. To improve this time, we have added an associative memory that reduces access time to one memory reference if the page-table entry is in the associative memory. Assume that 80 percent of the accesses are in the associative memory and that, of those remaining, 10 percent (or 2 percent of the total) cause page faults. What is the effective memory access time?

Questions?