lecture8 - CSCC69H Lecture 8 Dan Zingaro Fetch Policy I...

Info iconThis preview shows pages 1–6. 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

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: CSCC69H Lecture 8 Dan Zingaro June 28, 2010 Fetch Policy I When is a page assigned to a page frame? I Could create all mappings when a process starts running, but this causes slow startup I Demand paging: create mapping for each page in response to a page fault I Prepaging: on a page fault, attempt to anticipate future page use by reading additional pages I Demand paging is particularly appropriate when process exhibits limited spatial locality, and when cost of page fault is low I Linux uses demand paging for zero-filled pages, and prepaging for files mapped into virtual memory Replacement Policy I Chooses a page to evict every time a page is fetched with all page frames in use I OS typically performs some eviction in advance of actual demand, to keep an inventory of free page frames I Can do this when the hardware is otherwise idle I May be able to write several dirty pages back to disk in one operation I In the time between being freed and reused, a page frame can retain a copy of the page it most recently held (so the page can be mapped-in again without going to disk) Replacement Policy... I Local replacement: keeps rate of page evictions and page fetches balanced individually for each process I If a process incurs many page faults, it relinquishes its own page frames, rather than pushing other processes’ pages out of their frames I Excessive demand for memory prevents allocation policy from allocating a reasonable number of frames to each process I Global replacement: keeps rate of page evictions and page fetches balanced only on a system-wide basis I If a process incurs many page faults, other processes’ pages may be evicted I Process cannot control its own page fault rate I Excessive demand for memory causes thrashing (constantly paging) Replacement: LRU I If OS knew all future virtual memory accesses, it could replace the page that has its next use furthest in the future I This is optimal replacement, but unimplementable...
View Full Document

This note was uploaded on 02/05/2011 for the course CS 69 taught by Professor Cathy during the Summer '10 term at University of Toronto.

Page1 / 17

lecture8 - CSCC69H Lecture 8 Dan Zingaro Fetch Policy I...

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

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