9.Virtual_Memory - Memory Management (Virtual Memory) Mehdi...

Info iconThis preview shows pages 1–19. Sign up to view the full content.

View Full Document Right Arrow Icon
Memory Management (Virtual Memory) Mehdi Kargahi School of ECE University of Tehran Spring 2008
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
M. Kargahi (School of ECE) Background s It is not required to load all the program into main memory s Virtual memory separates logical memory from physical memory
Background image of page 2
M. Kargahi (School of ECE) Demand Paging s Pages are only loaded when they are demanded during program execution (using a pager ) s Swapper: manipulated entire processes s Pager: manipulates individual pages of a process
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
M. Kargahi (School of ECE) Demand Paging s If the pager guesses right the required pages at load time the execution can proceed normally
Background image of page 4
M. Kargahi (School of ECE) Handling a Page Fault
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
M. Kargahi (School of ECE) Handling a Page Fault s Whether are all instructions restartable? s IBM 370 b MVC with overlapping addresses s b MOV (R2)+, -(R3) s The microcode computes and attempts to access both ends of source and destination blocks s Using temporary registers to hold the values of overwritten locations s Locality of reference for instructions s The performance of demand paging can highly affect the feasibility of using paging in a system
Background image of page 6
M. Kargahi (School of ECE) Performance of Demand Paging s Effective access time = (1-p) × ma + p page fault time s Major components of page fault service time s Service the page fault interrupt s Read in the page s Restart the process
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
M. Kargahi (School of ECE) Effective access time = (1-p) × ma + p page fault time Computing the page fault time
Background image of page 8
M. Kargahi (School of ECE) Performance of Demand Paging s Effective access time = (1-p) × ma + p page fault time s Major components of page fault service time s Service the page fault interrupt (1 to 100 μ s) s Read in the page: 8 ms (ignoring device queueing time) s Hard disk latency: 3 ms s Seek time: 5 ms s Transfer time: 0.05 ms s Restart the process (1 to 100 μ s) s Assuming ma = 200 ns s P= 0.001 b eat = 8.2 μ s b computer is slowed down by a factor of 40 s For 10% slow down: b
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
M. Kargahi (School of ECE) Quiz (How demand paging can be improved?)
Background image of page 10
M. Kargahi (School of ECE) Copy-On-Write
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
M. Kargahi (School of ECE) Need for Page Replacement
Background image of page 12
M. Kargahi (School of ECE) Basic Page Replacement s Page fault and no free frame
Background image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
M. Kargahi (School of ECE) Basic Page Replacement s Reducing the overhead s Modify (Dirty) bit: Page not modified and read- only pages need not be written to the disk s Two important matters s How many frames should be allocated to each process? s Which page should be replaced to reduce the page fault probability? s Reference string
Background image of page 14
M. Kargahi (School of ECE) Reference String s Address sequence s Page size: 100 bytes s Reference string: s 3 frames for the process b 3 page faults s 1 frame b 11 page faults
Background image of page 15

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
M. Kargahi (School of ECE) Page Replacement Algorithms s Sample reference string: s FIFO page replacement s 15 page faults
Background image of page 16
M. Kargahi (School of ECE) Belady’s Anomaly and FIFO Page Replacement s Sample reference string: s Page faults with 1, 2, 3, 4, 5, and 6 pages?
Background image of page 17

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
M. Kargahi (School of ECE)
Background image of page 18
Image of page 19
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/21/2010 for the course COMPUTER S 001 taught by Professor Kargahi during the Spring '10 term at Amirkabir University of Technology.

Page1 / 49

9.Virtual_Memory - Memory Management (Virtual Memory) Mehdi...

This preview shows document pages 1 - 19. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online