Week 7 February 17, 2004 Adrienne Noble. Important Dates Due Monday, Feb 23 Homework 7 Due Wednesday, Feb 25 Project 3 Due Friday, Feb 27 Homework 8.

Slides:



Advertisements
Similar presentations
CMPT 300 Introduction to Operating Systems
Advertisements

1 CMSC421: Principles of Operating Systems Nilanjan Banerjee Principles of Operating Systems Acknowledgments: Some of the slides are adapted from Prof.
EECS 470 Virtual Memory Lecture 15. Why Use Virtual Memory? Decouples size of physical memory from programmer visible virtual memory Provides a convenient.
1 Virtual Memory Management B.Ramamurthy. 2 Demand Paging Main memory LAS 0 LAS 1 LAS 2 (Physical Address Space -PAS) LAS - Logical Address.
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.
Lecture 34: Chapter 5 Today’s topic –Virtual Memories 1.
Day 20 Memory Management. Assumptions A process need not be stored as one contiguous block. The entire process must reside in main memory.
CS 153 Design of Operating Systems Spring 2015
CS 153 Design of Operating Systems Spring 2015 Lecture 19: Page Replacement and Memory War.
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.
Lecture 11: Memory Management
Memory Problems Prof. Sin-Min Lee Department of Mathematics and Computer Sciences.
Memory Management. 2 How to create a process? On Unix systems, executable read by loader Compiler: generates one object file per source file Linker: combines.
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.
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.
Virtual Memory Management B.Ramamurthy. Paging (2) The relation between virtual addresses and physical memory addres- ses given by page table.
1 Virtual Memory Management B.Ramamurthy Chapter 10.
CS 140 Lecture Notes: Virtual MemorySlide 1 Load-Time Relocation Process 1 0 ∞ Process 3 Operating System Process 6.
Chapter 91 Translation Lookaside Buffer (described later with virtual memory) Frame.
Answers to the VM Problems Spring First question A computer has 32 bit addresses and a virtual memory with a page size of 8 kilobytes.  How many.
03/29/2004CSCI 315 Operating Systems Design1 Page Replacement Algorithms (Virtual Memory)
CSE378 Virtual memory.1 Evolution in memory management techniques In early days, single program ran on the whole machine –used all the memory available.
Slide 12-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter Virtual Memory.
Chapter VIII Virtual Memory Review Questions Jehan-François Pâris
Memory Management ◦ Operating Systems ◦ CS550. Paging and Segmentation  Non-contiguous memory allocation  Fragmentation is a serious problem with contiguous.
CS 153 Design of Operating Systems Spring 2015 Final Review.
Paging Examples Assume a page size of 1K and a 15-bit logical address space. How many pages are in the system?
Memory Management What if pgm mem > main mem ?. Memory Management What if pgm mem > main mem ? Overlays – program controlled.
CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11: :30 AM.
Memory Management What if pgm mem > main mem ?. Memory Management What if pgm mem > main mem ? Overlays – program controlled.
Operating Systems Unit 7: – Virtual Memory organization Operating Systems.
Lecture Topics: 11/24 Sharing Pages Demand Paging (and alternative) Page Replacement –optimal algorithm –implementable algorithms.
Memory Management & Virtual Memory © Dr. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada.
CS307 Operating Systems Virtual Memory Fan Wu Department of Computer Science and Engineering Shanghai Jiao Tong University Spring 2012.
Memory Management. Why memory management? n Processes need to be loaded in memory to execute n Multiprogramming n The task of subdividing the user area.
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.
Memory Management Continued Questions answered in this lecture: What is paging? How can segmentation and paging be combined? How can one speed up address.
Week 10 March 10, 2004 Adrienne Noble. Important Dates Project 4 due tomorrow (Friday) Final Exam on Tuesday, March 16, 2:30- 4:20pm.
Memory Management. 2 How to create a process? On Unix systems, executable read by loader Compiler: generates one object file per source file Linker: combines.
10.1 Chapter 10: Virtual Memory Background Demand Paging Process Creation Page Replacement Allocation of Frames Thrashing Operating System Examples.
CS 140 Lecture Notes: Virtual MemorySlide 1 Load-Time Relocation Process 1 0 ∞ Process 3 Operating System Process 6.
CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11: :30 AM.
CS 140 Lecture Notes: Virtual Memory
Day 19 Memory Management.
PA1 is out Best by Feb , 10:00 pm Enjoy early
Paging Examples Assume a page size of 1K and a 15-bit logical address space. How many pages are in the system?
Module 9: Virtual Memory
CS 140 Lecture Notes: Virtual Memory
Paging Lecture November 2018.
CS241 Section: Week 10.
Lecture 39 Syed Mansoor Sarwar
5: Virtual Memory Background Demand Paging
CPSC 457 Operating Systems
Virtual Memory فصل هشتم.
CS 140 Lecture Notes: Virtual Memory
CS 140 Lecture Notes: Demand Paging
CS 140 Lecture Notes: Demand Paging
Computer Architecture
February 12, 2004 Adrienne Noble
Recursive Page Table Lookup in the x86
Exercise (11).
Exercise (10).
Virtual Memory Lecture notes from MKP and S. Yalamanchili.
CS 140 Lecture Notes: Virtual Memory
Module 9: Virtual Memory
Chapter 8 & 9 Main Memory and Virtual Memory
Presentation transcript:

Week 7 February 17, 2004 Adrienne Noble

Important Dates Due Monday, Feb 23 Homework 7 Due Wednesday, Feb 25 Project 3 Due Friday, Feb 27 Homework 8

Questions? Lecture Project 3 Homework 7 and 8

Midquarter Evaluation Results More concrete examples and problems Q/A on projects is very helpful Mixed feelings about reviewing lecture material some love it, some think it’s a waste of time

Address translation and page faults page frame 0 page frame 1 page frame 2 page frame Y … page frame 3 physical memory offset physical address page frame # page table offset virtual address virtual page #

Address Space 8192 bytes (2 13 ) 2048 bytes (2 11 ) code (text segment) static data (data segment) heap (dynamic allocated mem) stack (dynamic allocated mem)

One Level Page Translation Specs: 16 bit address space 64 byte pages 2 bytes per page table entry (PTE) How many bits are needed for the offset? How many bits are needed for the virtual page number? How many PTEs will be in the page table? How much space will the page table take?

One Level Page Translation Specs: 16 bit address space 64 byte pages 2 bytes per page table entry (PTE) How many bits are needed for the offset? 6 bits (page size = 64 = 2 6 ) How many bits are needed for the virtual page number? 10 bits (address space / page size = 2 16 / 2 6 = 2 10 ) How many PTEs will be in the page table? 2 10 = 1024 PTEs How much space will the page table take? 1024 * 2 = 2048 bytes

Two Level Page Translation Specs: 16 bit address space 64 byte pages 2 bytes per page table entry (PTE) How many bits are needed for the offset? How many bits are needed for the virtual page number? How many PTEs will be in the base page table? How much space will the base page table take? How much space will the entire set of page tables take?

Two Level Page Translation Specs: 16 bit address space 64 byte pages 2 bytes per page table entry (PTE) How many bits are needed for the offset? 6 bits (page size = 64 = 2 6 ) How many bits are needed for the virtual page number? 5 bits (page size / PTE size = 64/2 = 32 entries per page = 2 5 ) How many pages will be in the base page table? 2 5 = 32 PTEs How much space will the base page table take? 2 5 * 2 = 64 bytes How much space will the entire set of page tables take? 1 table for stack (2048 / 64 byte pages = 32 pages) 4 tables for code, heap, data (8192 / 64 = 128) 1 base table Total = number of tables * table size = (1+4+1) * 64 = 384 bytes

Homework Review Why are page table entries all powers of 2? Say we have a 16 bit virtual address 10 bits for virtual page number and 6 bits for offset offset virtual address virtual page #

Page Replacement Algorithms Balady’s Algorithm FIFO LRU LRU approximation (clock) Hypothetical Working Set Algorithm Page Fault Frequency