Problems in Memory Management CS 1550 Recitation October 9 th, 2002 The questions in this slide are from Andrew S. Tanenbaum's textbook page 264.

Slides:



Advertisements
Similar presentations
1 Overview Assignment 4: hints Memory management Assignment 3: solution.
Advertisements

1 Overview Assignment 5: hints  Garbage collection Assignment 4: solution.
Problems in IO & File System CS 1550 Recitation November 4 th /6 th, 2002 The questions in this slide are from Andrew S. Tanenbaum's textbook page 375,
Virtual Memory. Hierarchy Cache Memory : Provide invisible speedup to main memory.
CS 153 Design of Operating Systems Spring 2015
Memory Management Design & Implementation Segmentation Chapter 4.
CS 342 – Operating Systems Spring 2003 © Ibrahim Korpeoglu Bilkent University1 Memory Management -3 CS 342 – Operating Systems Ibrahim Korpeoglu Bilkent.
CS 333 Introduction to Operating Systems Class 11 – Virtual Memory (1)
Virtual Memory. Why do we need VM? Program address space: 0 – 2^32 bytes –4GB of space Physical memory available –256MB or so Multiprogramming systems.
CS2422 Assembly Language & System Programming September 22, 2005.
03/22/2004CSCI 315 Operating Systems Design1 Virtual Memory Notice: The slides for this lecture have been largely based on those accompanying the textbook.
Memory Management 2 Tanenbaum Ch. 3 Silberschatz Ch. 8,9.
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.
Protected Mode. Protected Mode (1 of 2) 4 GB addressable RAM –( to FFFFFFFFh) Each program assigned a memory partition which is protected from.
Mem. Hier. CSE 471 Aut 011 Evolution in Memory Management Techniques In early days, single program run on the whole machine –Used all the memory available.
Virtual Memory By: Dinouje Fahih. Definition of Virtual Memory Virtual memory is a concept that, allows a computer and its operating system, to use a.
Lecture 21 Last lecture Today’s lecture Cache Memory Virtual memory
8.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 08 Main Memory (Page table questions)
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 34 Paging Implementation.
Operating Systems COMP 4850/CISG 5550 Page Tables TLBs Inverted Page Tables Dr. James Money.
8.1 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Paging Physical address space of a process can be noncontiguous Avoids.
CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11: :30 AM.
CS 149: Operating Systems March 3 Class Meeting Department of Computer Science San Jose State University Spring 2015 Instructor: Ron Mak
CS399 New Beginnings Jonathan Walpole. Virtual Memory (1)
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.
4.3 Virtual Memory. Virtual memory  Want to run programs (code+stack+data) larger than available memory.  Overlays programmer divides program into pieces.
Demand Paging Reference Reference on UNIX memory management
Virtual Memory Review Goal: give illusion of a large memory Allow many processes to share single memory Strategy Break physical memory up into blocks (pages)
X86 (32-bit) Paging Reference –text: Tanenbaum ch.4.3 Reference on Win2K memory management –text: Tanenbaum ch
CS 140 Lecture Notes: Virtual MachinesSlide 1 Process Abstraction Instruction Set Registers MMU I/O Devices Physical Memory Virtual Memory System Calls.
CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11: :30 AM.
Problems in IO CS 1550 Recitation December 2 nd /4 th, 2002 The questions in this slide are from Andrew S. Tanenbaum's textbook page 376, 377.
Memory Management & Virtual Memory. Hierarchy Cache Memory : Provide invisible speedup to main memory.
COMP 3500 Introduction to Operating Systems Paging: Basic Method Dr. Xiao Qin Auburn University Slides.
Introduction to Paging. Readings r 4.3 of the text book.
Computer Architecture Lecture 12: Virtual Memory I
CMSC 611: Advanced Computer Architecture
CS 140 Lecture Notes: Virtual Memory
Lecture 11 Virtual Memory
Paging.
CS161 – Design and Architecture of Computer
Virtual Memory - Part II
Virtual Memory User memory model so far:
Memory Management References text: Tanenbaum ch.4.
143A: Principles of Operating Systems Lecture 5: Address translation
Memory Hierarchy Virtual Memory, Address Translation
CS510 Operating System Foundations
CS 301 Fall 2001 – Chapter 3 Slides by Prof. Hartman, following “IBM PC Assembly Language Programming” by Peter Abel 9/17/2018.
Paging Examples Assume a page size of 1K and a 15-bit logical address space. How many pages are in the system?
CS 140 Lecture Notes: Virtual Machines
Lecture 28: Virtual Memory-Address Translation
CSCI206 - Computer Organization & Programming
CS 140 Lecture Notes: Virtual Memory
Paging Lecture November 2018.
Memory Management References text: Tanenbaum ch.4.
CS 140 Lecture Notes: Virtual Memory
Lecture 36 Syed Mansoor Sarwar
CSE451 Memory Management Introduction Autumn 2002
Practical Session 9, Memory
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
Lecture 34 Syed Mansoor Sarwar
Paging Memory Relocation and Fragmentation Paging
Assembly Language for Intel-Based Computers, 5th Edition
CS 140 Lecture Notes: Virtual Machines
CS 140 Lecture Notes: Virtual Memory
4.3 Virtual Memory.
Memory Management & Virtual Memory
CS703 - Advanced Operating Systems
Module IV Memory Organization.
Presentation transcript:

Problems in Memory Management CS 1550 Recitation October 9 th, 2002 The questions in this slide are from Andrew S. Tanenbaum's textbook page 264.

11. If an instruction takes 10 nsec and a page fault takes and additional n nsec, give a formula for the effective instruction time if page faults occur every k instructions. Consider k instructions: k-1 instructions execution without page fault: 10 * (k - 1) nsec 1 instuction with page fault: (10 + n) * 1nsec Average: (10*(k-1) + (10+n)*1) / k = 10 + n/k nsec

12. A machine has a 32-bit address space and an 8- KB page. The page is entirely in harware, with one 32-bit word per entry. The page table is copied to the hardware from memory, at one word every 100 nsec. If each process runs for 100 msec (including the time to load the page table), what fraction of the CPU time is devoted to loading the page tables? 1 nsec = 1/1,000,000,000 sec 1 msec = 1/1,000 sec Page size : 8-KB  # of offset bits 8-KB = 2^13 Bytes Offset bits : 13 bits Page number: 32 – 13 = 19 bits

How many pages are there? 2 ^ 19 = Load time: * 100 nsec = sec CPU time: 100 msec = 0.1 sec Fraction: / 0.1 = 52.4% Real World … 32-bit address space == 32-bit word per entry Always?