Memory Management What if pgm mem main mem

  • Slides: 14
Download presentation
Memory Management What if pgm mem > main mem ?

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 ? Overlays – program controlled

Memory Management What if pgm mem > main mem ? Virtual Memory – OS

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 Management Separate physical, logical address space Page faults Demand paging

Memory Access in VM Is access legal ? (seg fault) If page in physical

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 200 ns clock rate Main Mem access of

Memory Access Time Assume machine characteristics 200 ns clock rate Main Mem access of 5 cycles 1000 ns 25 milisecond page service time

Computing Average Access Time MAT = (1 – p) * 1000 + p *

Computing Average Access Time MAT = (1 – p) * 1000 + p * 25, 000 e. g. assume page fault rate of. 001 MAT =. 999 * 1000 +. 001 * 25, 000 = 999 + 25, 000 26 x penalty

Your Turn Those were 1998 numbers Assume 2 x speedup in clock speed every

Your Turn Those were 1998 numbers Assume 2 x speedup in clock speed every two years, 2 x 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 2 x main memory access time.

Replacement Policy (Page) FIFO Random Optimal LRU approximation

Replacement Policy (Page) FIFO Random Optimal LRU approximation

Sample References 70120304230321201701

Sample References 70120304230321201701

FIFO – 4 pages 70120304230321201701 2 3 4 0 1 2 7 1 2

FIFO – 4 pages 70120304230321201701 2 3 4 0 1 2 7 1 2 3 4 0 1 1 2 3 4 0 7 0

Optimal – 4 pages 70120304230321 01701 2 2 2 1 1 4 4 7

Optimal – 4 pages 70120304230321 01701 2 2 2 1 1 4 4 7 0 0 0 7 3 3

LRU – 4 pages 70120304230321 01701 2 2 2 1 1 4 1 1

LRU – 4 pages 70120304230321 01701 2 2 2 1 1 4 1 1 0 0 0 7 3 3 3 7

Your Turn 70120304230321201701 Show FIFO, LRU, Optimal for references above but with 3 pages.

Your Turn 70120304230321201701 Show FIFO, LRU, Optimal for references above but with 3 pages.