Download presentation
Presentation is loading. Please wait.
Published byFlorence Angela Boyd Modified over 9 years ago
1
Memory Management What if pgm mem > main mem ?
2
Memory Management What if pgm mem > main mem ? Overlays – program controlled
3
Memory Management What if pgm mem > main mem ? Virtual Memory – OS controlled (with architecture help)
4
Memory Management Separate physical, logical address space Page faults Demand paging
5
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
6
Memory Access Time Assume machine characteristics 200ns clock rate Main Mem access of 5 cycles 1000ns 25 milisecond page service time
7
Computing Average Access Time MAT = (1 – p) * 1000 + p * 25,000,000 e.g. assume page fault rate of.001 MAT =.999 * 1000 +.001 * 25,000,000 = 999 + 25,000 26x penalty
8
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.
9
Replacement Policy (Page) FIFO Random Optimal LRU LRU approximation
10
Sample References 7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1
11
FIFO – 4 pages 7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1 2 14 372104 2012 120 3 3401 7012340
12
Optimal – 4 pages 7 0 1 2 0 3 0 4 2 3 0 3 2 1 0 1 7 0 1 2 14 2112 17 000 4 00 73333
13
LRU – 4 pages 7 0 1 2 0 3 0 4 2 3 0 3 2 1 0 1 7 0 1 2 11 2222 11 000 4 00 73337
14
Your Turn 7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1 Show FIFO, LRU, Optimal for references above but with 3 pages.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.