CS241 System Programming Memory Management (VI)ContentAdministrativeThrashingThrashing and CPU UtilizationWorking SetWorking Set in ActionWorking Set ExampleWorking Set SolutionPage Fault Frequency Version of Working SetSlide 11Page Size ConsiderationsSummaryCS241 System ProgrammingMemory Management (VI)Klara NahrstedtLecture 334/14/200601/14/19 CS 241 - System Programming, Klara Nahrstedt2Content Design Issues for Paging Systems–Thrashing–Working set–Page size issues01/14/19 CS 241 - System Programming, Klara Nahrstedt3Administrative MP4 is posted, due April 17, 200601/14/19 CS 241 - System Programming, Klara Nahrstedt4ThrashingComputations have locality.As page frames decrease, the page frames available are not large enough to contain the locality of the process.The processes start faulting heavily.Pages that are read in, are used and immediately paged out.01/14/19 CS 241 - System Programming, Klara Nahrstedt5Thrashing and CPU UtilizationAs the page rate goes up, processes get suspended on page out queues for the disk.the system may try to optimize performance by starting new jobs.starting new jobs will reduce the number of page frames available to each process, increasing the page fault requests.system throughput plunges.01/14/19 CS 241 - System Programming, Klara Nahrstedt6Working Setthe working set model assumes locality. the principle of locality states that a program clusters its access to data and text temporally. As the number of page frames increases above some threshold, the page fault rate will drop dramatically.01/14/19 CS 241 - System Programming, Klara Nahrstedt7Working Set in ActionAlgorithm–if # free page frames > working set of some suspended process, then activate process and map in all its working set–if working set size of some process increases and no page frame is free, suspend process and release all its pagesmoving window over reference string used for determination.keeping track of working set.01/14/19 CS 241 - System Programming, Klara Nahrstedt8Working Set Example12 references, 8 faults Window size is 01/14/19 CS 241 - System Programming, Klara Nahrstedt9Working Set SolutionApproximate working set model using timer and reference bit.Set timer to interrupt after approximately x references, .Remove pages that have not been referenced and reset reference bit. How large should be the timer (working set)?01/14/19 CS 241 - System Programming, Klara Nahrstedt10Page Fault FrequencyVersion of Working SetAssume that if the working set is correct there will not be many page faults.If page fault rate increases beyond assumed knee of curve, then increase number of page frames available to process.If page fault rate decreases below foot of knee of curve, then decrease number of page frames available to process.01/14/19 CS 241 - System Programming, Klara Nahrstedt11Page Fault Frequency Version of Working Set01/14/19 CS 241 - System Programming, Klara Nahrstedt12Page Size ConsiderationsSmall pages–Reason: Locality of reference tends to be small (256)Less fragmentation–What is the problem with small pages?Large pages–ReasonSmall page tableI/O transfers have high seek time, so better to transfer more data per seek–What is the problem with large pages?01/14/19 CS 241 - System Programming, Klara Nahrstedt13SummaryDesign issues are of great importance to make the paging scheme effectiveRead Chapter T: 4.4.1, 4.4.2, 4.4.3, 4.4.4, 4.4.5, 4.4.6, and
View Full Document