Thrashing and Multiprogramming Load-Control: . Book sections: section 9.6 and 9.7. ------------------------------------------------------------------------- . Thrashing: - concept - causes: . by one program, due to the nature of the application or the mismatch between the kernel's page replacement algorithm and the application's page reference pattern; . by multi-programming: too many programs compete for memory; can't hold them all; - global replacement versus local replacement; . Multi-Programming Load Control: - when to admit a process to run? - how to have maximum utilization of CPU and disk? - when to swap out a process? when to swap it back in? . Models of program behavior: - page fault rate as a function of available memory; . knees in this curve; . based on resource allocation theory, maximum utilization is when the system allocates enough memory to the processes so that they are at the knee points of their curve; - Locality: temporal locality and spatial locality; - the "Phase-Transition" model of a program's memory reference behavior; . Working set: - definition; - measuring a program's working set; . the Working-set algorithm for load control; . load control based on page-fault frequency: stop increasing the multi-program level when the time between page faults equals the average page fault service time (that is, when the disk is 50% busy);