Computer Science 162 - Fall 1998 - Smith - Midterm 2

Computer Science 162 - Fall 1998 - Smith - Midterm 2 -...

Info iconThis preview shows pages 1–3. 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
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: file:///C|/Documents%20and%20Settings/Jason%20Raftery/My%20Doc...ence%20162%20-%20Fall%201998%20-%20Smith%20-%20Midterm%202.txt Midterm 2, November 2, 1998 - solutions 1. Explain thrashing. Define the Working Set Paging algorithm and explain how one of the features of the Working Set paging algorithm is to avoid thrashing. (11) Thrashing is a situation in which the processor spends most of its time either processing page faults or in page fault idle. This occurs either because the degree of multiprogramming is too high, or one or more processes are badly behaved and use too much memory. In either case, it is because demand for memory exceeds supply. The working set paging algorithm keeps in memory exactly those pages for each process that have been referenced in the preceding T virtual time units. Or - the working set paging algorithm keeps in memory those pages that a process needs to run efficiently. The working set paging algorithm will not allow a process to run (i.e. put it in the "in memory queue") unless there is enough memory available for its working set. 2. For the following page reference string, give the number of page faults for memories of sizes 3 and 4, and for working set, for a working set parameter value of 4.5. No partial credit, but show your work. (21) .ft CW 2 3 4 5 2 3 1 2 3 4 5 1 2 3 \ 3 4 _____________ LRU | 12 10 | FIFO | 11 12 | OPT | 8 6 | file:///C|/Documents%20and%20Settings/Jason%20Rafte...20-%20Fall%201998%20-%20Smith%20-%20Midterm%202.txt (1 of 6)1/27/2007 3:59:46 PM file:///C|/Documents%20and%20Settings/Jason%20Raftery/My%20Doc...ence%20162%20-%20Fall%201998%20-%20Smith%20-%20Midterm%202.txt WS 10 ============================== work: 3. What is the function of a page table? What is the function of the memory map( also called the "core map")? What is the relation of one to the other. Why do you need both? A page table contains entries that map virtual page numbers to physical page numbers. A memory maps maps physical page frames to virtual page numbers. The information that we really care about in this mapping is not to be able to associate page numbers, but to be able to locate Page Table Entries that point to a particular physical page frame. We need to locate these PTE's when a page is to be replaced. The PTE's can contain referenced and modified bits that helps the OS make its page replacement decision. Most importantly, the PTE for the page that is to be swapped out must be modified to reflect the fact that it's no longer in memory. You received 4 points for knowing what a page table is. The remaining 8 points are given for how well you knew what a memory map is and WHY we need it to do paging....
View Full Document

This note was uploaded on 05/17/2009 for the course CS 162 taught by Professor Kubiatowicz during the Spring '02 term at Berkeley.

Page1 / 6

Computer Science 162 - Fall 1998 - Smith - Midterm 2 -...

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