Lec9_mem - Midterm Statistics CSE120 Principles of...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
1 CSE120 Principles of Operating Systems Prof Yuanyuan (YY) Zhou Lecture 9: Memory Management Oct 28th, 2010 Midterm Statistics Is it hard? 10/27/2010 CSE 120 – Lecture 9 – Memory Management 2 Final Grade Combination of Midterm Projects Final exam Letter grades are based on relative performance, not absolute performance 10/27/2010 CSE 120 – Lecture 9 – Memory Management 3 10/27/2010 CSE 120 – Lecture 9 – Memory Management 4 Memory Management Next few lectures are going to cover memory management Goals of memory management To provide a convenient abstraction for programming To allocate scarce memory resources among competing processes to maximize performance with minimal overhead Mechanisms Physical and virtual addressing (1) Techniques: partitioning, paging, segmentation (1) Page table management, TLBs, VM tricks (2) Policies Page replacement algorithms (3)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 10/27/2010 CSE 120 – Lecture 9 – Memory Management 5 Lecture Overview Virtual memory warm-and-fuzzy Survey techniques for implementing virtual memory Fixed and variable partitioning Paging Segmentation Focus on hardware support and lookup procedure Next lecture we’ll go into sharing, protection, efficient implementations, and other VM tricks and features 10/27/2010 CSE 120 – Lecture 9 – Memory Management 6 Virtual Memory The abstraction that the OS will provide for managing memory is virtual memory (VM) Virtual memory enables a program to execute with less than its complete data in physical memory A program can run on a machine with less memory than it “needs” Can also run on a machine with “too much” physical memory Many programs do not need all of their code and data at once (or ever) – no need to allocate memory for it OS will adjust amount of memory allocated to a process based upon its behavior VM requires hardware support and OS management algorithms to pull it off Let’s go back to the beginning… 10/27/2010 CSE 120 – Lecture 9 – Memory Management 7 In the beginning… Rewind to the days of “second-generation” computers Programs use physical addresses directly OS loads job, runs it, unloads it Multiprogramming changes all of this Want multiple processes in memory at once Overlap I/O and CPU of multiple jobs Can do it a number of ways Fixed and variable partitioning, paging, segmentation Requirements Need protection – restrict which addresses jobs can use Fast translation – lookups need to be fast Fast change – updating memory hardware on context switch 10/27/2010 CSE 120 – Lecture 9 – Memory Management 8 Virtual Addresses To make it easier to manage the memory of processes running in the system, we’re going to make them use virtual addresses (logical addresses) Virtual addresses are independent of the actual physical location of the data referenced OS determines location of data in physical memory
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 10

Lec9_mem - Midterm Statistics CSE120 Principles of...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online