Memory Management What if pgm mem > main mem ?. Memory Management What if pgm mem > main mem ? Overlays – program controlled.

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

1 Lecture 13: Cache and Virtual Memroy Review Cache optimization approaches, cache miss classification, Adapted from UCB CS252 S01.
Virtual Memory Management G. Anuradha Ref:- Galvin.
Virtual Memory. 2 What is virtual memory? Each process has illusion of large address space –2 32 for 32-bit addressing However, physical memory is much.
Lecture 8 Memory Management. Paging Too slow -> TLB Too big -> multi-level page table What if all that stuff does not fit into memory?
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.
Virtual Memory Introduction to Operating Systems: Module 9.
Computer Organization CS224 Fall 2012 Lesson 44. Virtual Memory  Use main memory as a “cache” for secondary (disk) storage l Managed jointly by CPU hardware.
Lecture 34: Chapter 5 Today’s topic –Virtual Memories 1.
CS 162 Discussion Section Week 7. Recap What is demand paging?
CSC 4250 Computer Architectures December 8, 2006 Chapter 5. Memory Hierarchy.
Day 23 Virtual Memory. Operating system’s role in VM Hardware-support Use VM or not Use paging or segmentation or both Software domain Algorithms for.
Memory/Storage Architecture Lab Computer Architecture Virtual Memory.
03/26/2010CSCI 315 Operating Systems Design1 Virtual Memory Notice: The slides for this lecture have been largely based on those accompanying an earlier.
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.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts, Amherst Operating Systems CMPSCI 377 Lecture.
03/29/2004CSCI 315 Operating Systems Design1 Page Replacement Algorithms (Virtual Memory)
1 Last Time: Paging Motivation Page Tables Hardware Support Benefits.
Lecture 33: Chapter 5 Today’s topic –Cache Replacement Algorithms –Multi-level Caches –Virtual Memories 1.
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.
Memory Management ◦ Operating Systems ◦ CS550. Paging and Segmentation  Non-contiguous memory allocation  Fragmentation is a serious problem with contiguous.
Virtual Memory.
Chapter 21 Virtual Memoey: Policies Chien-Chung Shen CIS, UD
Operating Systems CMPSC 473 Virtual Memory Management (3) November – Lecture 20 Instructor: Bhuvan Urgaonkar.
Virtual Memory Virtual Memory is created to solve difficult memory management problems Data fragmentation in physical memory: Reuses blocks of memory.
Virtual Memory. Background Virtual memory is a technique that allows execution of processes that may not be completely in the physical memory. Virtual.
Memory Management What if pgm mem > main mem ?. Memory Management What if pgm mem > main mem ? Overlays – program controlled.
Lecture 11 Page 1 CS 111 Online Virtual Memory A generalization of what demand paging allows A form of memory where the system provides a useful abstraction.
Virtual Memory The memory space of a process is normally divided into blocks that are either pages or segments. Virtual memory management takes.
Lecture Topics: 11/24 Sharing Pages Demand Paging (and alternative) Page Replacement –optimal algorithm –implementable algorithms.
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.
CS2100 Computer Organisation Virtual Memory – Own reading only (AY2015/6) Semester 1.
Virtual Memory Ch. 8 & 9 Silberschatz Operating Systems Book.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 5:
Constructive Computer Architecture Virtual Memory: From Address Translation to Demand Paging Arvind Computer Science & Artificial Intelligence Lab. Massachusetts.
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.
1 Contents Memory types & memory hierarchy Virtual memory (VM) Page replacement algorithms in case of VM.
Virtual Memory. 2 Last Week Memory Management Increase degree of multiprogramming –Entire process needs to fit into memory Dynamic Linking and Loading.
Chapter 9: Virtual Memory. 9.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Background Virtual memory – separation of user logical memory.
Memory Management What if pgm mem > main mem ?. Memory Management What if pgm mem > main mem ? Overlays – program controlled.
Memory Management (2).
ECE232: Hardware Organization and Design
CS2100 Computer Organization
CS161 – Design and Architecture of Computer
Chapter 9: Virtual Memory – Part I
From Address Translation to Demand Paging
Day 22 Virtual Memory.
Virtual Memory Use main memory as a “cache” for secondary (disk) storage Managed jointly by CPU hardware and the operating system (OS) Programs share main.
Module 9: Virtual Memory
Chapter 9: Virtual-Memory Management
ECE 445 – Computer Organization
ICS Principles of Operating Systems
What Happens if There is no Free Frame?
Demand Paged Virtual Memory
CS 140 Lecture Notes: Demand Paging
Contents Memory types & memory hierarchy Virtual memory (VM)
CSC3050 – Computer Architecture
CS 140 Lecture Notes: Demand Paging
Computer Architecture
Operating Systems CMPSC 473
Exercise (11).
Exercise (10).
Module 9: Virtual Memory
Review What are the advantages/disadvantages of pages versus segments?
Clock Algorithm Example
Module IV Memory Organization.
Presentation transcript:

Memory Management What if pgm mem > main mem ?

Memory Management What if pgm mem > main mem ? Overlays – program controlled

Memory Management What if pgm mem > main mem ? Virtual Memory – OS controlled (with architecture help)

Memory Management Separate physical, logical address space Page faults Demand paging

Memory Access in VM Is access legal ? (seg fault) If page in physical memory, return mem Else Find free page Schedule disk operation Perform disk operation Update page table Restart program at offending address

Memory Access Time Assume machine characteristics 200ns clock rate Main Mem access of 5 cycles  1000ns 25 milisecond page service time

Computing Average Access Time MAT = (1 – p) * p * 25,000,000 e.g. assume page fault rate of.001 MAT =.999 * * 25,000,000 = ,000  26x penalty

Your Turn Those were 1998 numbers Assume 2x speedup in clock speed every two years, 2x speedup in disk access time every 4 years What penalty would.001 page fault rate lead to in 2010? What page fault rate would allow MAT of 2x main memory access time.

Replacement Policy (Page) FIFO Random Optimal LRU LRU approximation

Sample References

FIFO – 4 pages

Optimal – 4 pages

LRU – 4 pages

Your Turn Show FIFO, LRU, Optimal for references above but with 3 pages.