ECE344-Lecture16-Memory Management

ECE344-Lecture16-Memory Management - 1 Lecture 16: Memory...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

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

Unformatted text preview: 1 Lecture 16: Memory Management David Lie ECE344 University of Toronto 2 ECE344: Operating Systems Overview The TLB Miss Handler: Page Fault Handler Swap Handler Managing the Swap Area Paging issues and Performance Putting it all together. VM and OS events: Process Creation, Copy-on-Write Process Termination Context Switching Memory mapped files and shared memory Modern Paging hardware: Superpages 3 ECE344: Operating Systems Page Table Entries Page table entries usually have the exact same format as the PFN half of a TLB entry: This way you can just write the page table entry into the TLB, more efficient Dont need to store the VPN-half of the TLB entry in page table, only the PFN-half. Why? PFN C X W A V Unused 20-bits 12-bits 4 ECE344: Operating Systems Page Fault Handler Detail 1. No Valid page entry: Allocate a page (using kernel page allocator function). If no memory to allocate call swap handler (if lazy). 2. Increment reference to the allocated page in coremap 3. Check if there is a file backing the region (i.e. text or data regions) If so read the contents from disk and fill the page 4. Check if the page is on swap (page was allocated already but then swapped out). If not, then this is the first time the virtual page has been accessed....
View Full Document

This document was uploaded on 02/20/2012.

Page1 / 14

ECE344-Lecture16-Memory Management - 1 Lecture 16: Memory...

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

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