03/24/2004CSCI 315 Operating Systems Design1 Memory Management and Virtual Memory (Problem session)

Slides:



Advertisements
Similar presentations
Operating Systems Review.
Advertisements

Paging Hardware With TLB
Chapter 9: Main Memory. 8.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 22, 2005 Chapter 9: Memory Management Background.
Memory Management.
03/10/2004CSCI 315 Operating Systems Design1 Memory Management Notice: The slides for this lecture have been largely based on those accompanying the textbook.
Chapter 3.2 : Virtual Memory
Chapter 3 Memory Management
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 8: Main Memory.
1 School of Computing Science Simon Fraser University CMPT 300: Operating Systems I Ch 8: Memory Management Dr. Mohamed Hefeeda.
Memory Management Gordon College Stephen Brinton.
Chapter 7: Main Memory CS 170, Fall Memory Management Background Swapping Contiguous Memory Allocation Paging Structure of the Page Table Segmentation.
03/22/2004CSCI 315 Operating Systems Design1 Virtual Memory Notice: The slides for this lecture have been largely based on those accompanying the textbook.
Main Memory. Background Program must be brought (from disk) into memory and placed within a process for it to be run Main memory and registers are only.
03/17/2008CSCI 315 Operating Systems Design1 Virtual Memory Notice: The slides for this lecture have been largely based on those accompanying the textbook.
1 Tuesday, July 04, 2006 "Programs expand to fill the memory available to hold them." - Modified Parkinson’s Law.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 8: Main Memory.
Chapter 8: Main Memory.
Chapter 8 Main Memory Bernard Chen Spring Objectives To provide a detailed description of various ways of organizing memory hardware To discuss.
Chap 8 Memory Management. Background Program must be brought into memory and placed within a process for it to be run Input queue – collection of processes.
Memory Management Ch.8.
Chapter 8: Main Memory. 8.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 8: Memory Management Background Swapping Contiguous.
Chapter 8: Main Memory. Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Paging Structure of the Page Table Segmentation.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 346, Royden, Operating System Concepts Operating Systems Lecture 24 Paging.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 9: Memory Management Background Swapping Contiguous Allocation Paging Segmentation.
CS 346 – Chapter 8 Main memory –Addressing –Swapping –Allocation and fragmentation –Paging –Segmentation Commitment –Please finish chapter 8.
Review of Memory Management, Virtual Memory CS448.
Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems David Goldschmidt, Ph.D.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Lecture 8 Operating Systems.
Operating Systems Chapter 8
Chapter 8 Memory Management Dr. Yingwu Zhu. Outline Background Basic Concepts Memory Allocation.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 8: Main Memory.
8.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 08 Main Memory (Page table questions)
Exam2 Review Bernard Chen Spring Deadlock Example semaphores A and B, initialized to 1 P0 P1 wait (A); wait(B) wait (B); wait(A)
COS 598: Advanced Operating System. Operating System Review What are the two purposes of an OS? What are the two modes of execution? Why do we have two.
8.4 paging Paging is a memory-management scheme that permits the physical address space of a process to be non-contiguous. The basic method for implementation.
1 Chapter 3.2 : Virtual Memory What is virtual memory? What is virtual memory? Virtual memory management schemes Virtual memory management schemes Paging.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 34 Paging Implementation.
CS212: OPERATING SYSTEM Lecture 5: Memory Management Strategies 1 Computer Science Department.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 9: Memory Management Background Swapping Contiguous Allocation Paging Segmentation.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 8: Main Memory.
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-8 Memory Management (2) Department of Computer Science and Software.
Memory Management 1. Background Programs must be brought (from disk) into memory for them to be run Main memory and registers are only storage CPU can.
Paging Example What is the data corresponding to the logical address below:
8.1 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Paging Physical address space of a process can be noncontiguous Avoids.
1 Address Translation Memory Allocation –Linked lists –Bit maps Options for managing memory –Base and Bound –Segmentation –Paging Paged page tables Inverted.
1 Memory Management (b). 2 Paging  Logical address space of a process can be noncontiguous; process is allocated physical memory whenever the latter.
9.1 Operating System Concepts Paging Example. 9.2 Operating System Concepts.
Chapter 91 Logical Address in Paging  Page size always chosen as a power of 2.  Example: if 16 bit addresses are used and page size = 1K, we need 10.
Paging Paging is a memory-management scheme that permits the physical-address space of a process to be noncontiguous. Paging avoids the considerable problem.
8.1 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Objectives To provide a detailed description of various ways of organizing.
CSC 360, Instructor Kui Wu Memory Management I: Main Memory.
Page Table Implementation. Readings r Silbershatz et al:
Memory Management Continued Questions answered in this lecture: What is paging? How can segmentation and paging be combined? How can one speed up address.
Chapter 8: Main Memory. 8.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 22, 2005 Memory and Addressing It all starts.
8.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Fragmentation External Fragmentation – total memory space exists to satisfy.
Silberschatz, Galvin and Gagne  Operating System Concepts Paging Logical address space of a process can be noncontiguous; process is allocated.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 8: Main Memory.
Chapter 7: Main Memory CS 170, Fall Program Execution & Memory Management Program execution Swapping Contiguous Memory Allocation Paging Structure.
Operating Systems, Winter Semester 2011 Practical Session 9, Memory 1.
W4118 Operating Systems Instructor: Junfeng Yang.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 33 Paging Read Ch. 9.4.
Memory: Page Table Structure CSSE 332 Operating Systems Rose-Hulman Institute of Technology.
COMP 3500 Introduction to Operating Systems TLB and Memory Accesses Dr. Xiao Qin Auburn University Slides.
Memory: Page Table Structure
CSCI206 - Computer Organization & Programming
Operating Systems Review.
FIGURE 12-1 Memory Hierarchy
Operating Systems Placement Algorithm Alok Kumar Jagadev.
CPSC 457 Operating Systems
Presentation transcript:

03/24/2004CSCI 315 Operating Systems Design1 Memory Management and Virtual Memory (Problem session)

03/24/2004CSCI 315 Operating Systems Design2 Problem 1 Given five memory partitions of 100KB, 500KB, 200KB, 300KB, and 600KB (in this order), how would each of the first-fit, best-fit, and worst-fit algorithms place processes of 212KB, 417KB, 112KB, and 426KB (in this order)? Which algorithm makes the most efficient use of memory?

03/24/2004CSCI 315 Operating Systems Design3 Problem 2 Explain the address translation scheme in this figure. What do the fields p and d in a logical address represent? What do f and d represent in a physical address?

03/24/2004CSCI 315 Operating Systems Design4 Problem 3 What is the function of a TLB (translation lookaside buffer) in the translation of logical to physical address? How big should the TLB be?

03/24/2004CSCI 315 Operating Systems Design5 Problem 4 Consider a logical address on a 32-bit machine with 4K page size. –How many bits are used for page number? –How many entries does the page table have? –Does the whole page table fit within 4K? –How many bits are used for page offset? Explain how a hierarchical paging scheme with logical addresses structure as in the picture below would work. How many bits of the logical address should be reserved for the page offset d? (Assume 32-bit address and page size 4K.) page number page offset p1p1 p2p2 d

03/24/2004CSCI 315 Operating Systems Design6 Problem 5 Consider a paging scheme with the page table stored in memory. –If a direct memory reference takes 80 ns, how long does a paged memory reference take in the best case? –If we add a TLB, and 75% of all page-table references are found in the TLB, what is the effective access time? (Assume that finding a page- table entry in the TLB takes 10ns, if the entry is there, and 100ns, if the entry is not there.)

03/24/2004CSCI 315 Operating Systems Design7 Problem 6 i free frame operating system physical memory disk page table Explain the sequence of operations in a virtual memory system that starts with (1), a reference to a page that is not currently in physical memory. running process

03/24/2004CSCI 315 Operating Systems Design8 Problem 7 Which of the following programming techniques and structures are “good” for a demand paged environment? Which are “bad”? Explain your answers. a.Stack b.Hashed symbol table c.Sequential search d.Binary search e.Pure code (that is, no data) f.Linear array (vector) operations