lec10_mem

lec10_mem - Midterm Statistics CSE120 Principles of...

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

View Full Document Right Arrow Icon
1 CSE120 Principles of Operating Systems Prof Yuanyuan (YY) Zhou Lecture 10: paging May 9th, 2011 Midterm Statistics 5/9/2011 CSE 120 – Lecture 10 – Paging 2 Review Fixed and variable size partition Simple to implement (base and limit registers) Internal vs. external fragmentation Best, worst, fast fit Bitmap vs. link-list implementation of free memory regions Paging Page size is a power of 2 Virtual page number physical page frame How to calculate VPN from virtual address? How to get physical address? Segmentation Segmentation table Hybrid: paging+segmentation 5/9/2011 CSE 120 – Lecture 10 – Paging 3 5/9/2011 CSE 120 – Lecture 10 – Paging 4 Today’s Lecture Today we’ll cover more paging mechanisms: Optimizations Managing page tables (space) Efficient translations (TLBs) (time) Demand paged virtual memory (space) Recap address translation
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 5/9/2011 CSE 120 – Lecture 10 – Paging 5 Page Mapping Hardware Contents(P,D) Contents(F,D) P D F D P-> F 0 1 0 1 1 0 1 Page Table Virtual Memory Physical Memory Virtual Address (P,D) Physical Address (F,D) P F D D P 5/9/2011 CSE 120 – Lecture 10 – Paging 6 Page Mapping Hardware Contents(4006) Contents(5006) 004 006 005 006 4-> 5 0 1 0 1 1 0 1 Page Table Virtual Memory Physical Memory Virtual Address (004006) Physical Address (F,D) 004 005 006 006 4 Page size 0x1000 Number of Possible Virtual Pages 0x1000 Number of Page Frames 8 5/9/2011 CSE 120 – Lecture 10 – Paging 7 Paging Issues Page size is 2 n usually 512, 1k, 2k, 4k, or 8k E.g. 32 bit VM address may have 2 20 (1MB) pages with 4k (2 12 ) bytes per page Page table: 2 20 page entries take 2 22 bytes (4MB) 5/9/2011 CSE 120 – Lecture 10 – Paging 8 Managing Page Tables The page table for a 32-bit address space w/ 4K pages to be 4MB This is far too much overhead for each process How can we reduce this overhead? Observation: Only need to map the portion of the address space actually being used (tiny fraction of entire addr space) How do we only map what is being used? Can dynamically extend page table… Does not work if addr space is sparse (internal fragmentation), why ? So now what?
Background image of page 2
3 Discussion How to reduce page table size if the virtual pages are sparse?
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 8

lec10_mem - Midterm Statistics CSE120 Principles of...

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

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