32-MemoryThrashing - CS 241 Spring 2008 System Programming...

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

View Full Document Right Arrow Icon
CS 241 Spring 2008 System Programming 1 Lawrence Angrave Paging basic process implementation Frame allocation for multiple processes Thrashing Working Set (Memory-Mapped Files)
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 Contents
Background image of page 2
3 Basic Paging Process Implementation(1) Separate page out from page in Keep a pool of free frames when a page is to be replaced, use a free frame read the faulting page and restart the faulting process while page out is occurring Why ? Alternative: Before a frame is needed to read in the faulted page from disk, just evict a page Disadvantage with alternative:
Background image of page 3

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

View Full DocumentRight Arrow Icon
4 Basic Paging Process Implementation(2) Paging out Write dirty pages to disk whenever the paging device is free and reset the dirty bit Benefit? Remove the paging out (disk writes) process from the critical path allows page replacement algorithms to replace clean pages What should we do with paged out pages? Cache paged out pages in primary memory (giving it a second chance) Return paged-out pages to a free pool but remember which page frame they are.
Background image of page 4
5 Frame Allocation for Multiple Processes How are the page frames allocated to individual virtual memories of the various jobs running in a multi-programmed environment? Simple solution Allocate a minimum number (??) of frames per process. One page from the current executed instruction Most instructions require two operands include an extra page for paging out and one for paging in
Background image of page 5

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

View Full DocumentRight Arrow Icon
6 Multi-Programming Frame Allocation Solution 2 allocate an equal number of frames per job but jobs use memory unequally high priority jobs have same number of page frames and low priority jobs degree of multiprogramming might vary
Background image of page 6
Multi-Programming Frame Allocation Solution 3: allocate a number of frames per job proportional to job size how do you determine job size: by run command parameters or dynamically? Why is multi-programming frame allocation is
Background image of page 7

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

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

This note was uploaded on 05/04/2008 for the course CS 241 taught by Professor Systemsprogramming during the Spring '08 term at University of Illinois at Urbana–Champaign.

Page1 / 32

32-MemoryThrashing - CS 241 Spring 2008 System Programming...

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

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