Memory Management What if pgm mem > main mem ?
Memory Management What if pgm mem > main mem ? Overlays – program controlled
Memory Management What if pgm mem > main mem ? Virtual Memory – OS controlled (with architecture help)
Memory Management Separate physical, logical address space Page faults Demand paging
Memory Access in VM Is access legal ? (seg fault) If page in physical memory, return mem Else Find free page Schedule disk operation Perform disk operation Update page table Restart program at offending address
Memory Access Time Assume machine characteristics 200ns clock rate Main Mem access of 5 cycles 1000ns 25 milisecond page service time
Computing Average Access Time MAT = (1 – p) * p * 25,000,000 e.g. assume page fault rate of.001 MAT =.999 * * 25,000,000 = ,000 26x penalty
Your Turn Those were 1998 numbers Assume 2x speedup in clock speed every two years, 2x speedup in disk access time every 4 years What penalty would.001 page fault rate lead to in 2010? What page fault rate would allow MAT of 2x main memory access time.
Replacement Policy (Page) FIFO Random Optimal LRU LRU approximation
Sample References
FIFO – 4 pages
Optimal – 4 pages
LRU – 4 pages
Your Turn Show FIFO, LRU, Optimal for references above but with 3 pages.