1 / 17

Virtual Memory Management

Virtual Memory Management. demand paging page fault. Virtual Memory. Definition : A technique that allows the execution of processes that may not be completely in memory. Advantage : Programs can be larger than physical memory. Disadvantage : not easy to implement

Télécharger la présentation

Virtual Memory Management

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Virtual Memory Management demand paging page fault SunMoon University

  2. Virtual Memory • Definition : • A technique that allows the execution of processes that may not be completely in memory. • Advantage : • Programs can be larger than physical memory. • Disadvantage : • not easy to implement • decrease performance if it is used carelessly SunMoon University

  3. Motivation(1) • Exam. of real programs • the entire program is not needed  p.238 • not needed at the same time  overlay • Advantages of partial allocation • fig 8.1 • large VAS, simplifying the programming task • increase the multiprogramming degree • less I/O  run faster SunMoon University

  4. SunMoon University

  5. Motivation(2) • Virtual Memory • implemented by (demand) paging or • by segmentation or • by paged segmentation scheme • Several Storage Management Strategies for Virtual Storage System  problems of partial allocation in V.M. 1) Fetch Demand Fetch Anticpatory Fetch SunMoon University

  6. Motivation(3) 2) Placement Paging Segmentation Paged Segmentation 3) Replacement SunMoon University

  7. Demand Paging(1) - similar to a paging system with swapping fig 8.2 - pager vs. swapper (lazy) swapper swapping the entire process into memory never swaps if that page will not be needed pager individual pages of a process decreasing the swap time and the amount of physical memory needed SunMoon University

  8. SunMoon University

  9. Demand Paging(2) • Page Table • fig 8.3 • valid-invalid bit • Step in Handling a Page Fault • fig 8.4 • In the extreme case, -Start executing a process with no page in memory • “Pure Demand Paging” : never bring a page into memory until it is required SunMoon University

  10. SunMoon University

  11. SunMoon University

  12. Demand Paging(3) • The H/W to support Demand Paging • Page Table • The ability to mark an entry ( Invalid / Valid ) • Secondary Memory • holds those pages not in main memory • high-speed disks • swap device/swap space SunMoon University

  13. Performance of Paging(1) • Three Major Components of the Page-Fault Service Time • Service the Page-Fault Interrupt. • Read in the Page. • Restart the Process.  Disk I/O is do expensive. SunMoon University

  14. Performance of Paging(2) • 페이지 부재 발생하지 않은 경우 : • 유효접근시간 = 메모리접근시간(Ma) • 페이지 부재 확률 : p • 0≤p≤1 ⇒ 0에 매우 가깝기를 기대(약간의 페이지 부재율) • 유효 접근 시간 = (1-p) × Ma + p ×( 페이지 부재 시간) • 평균 페이지 부재 서비스 시간 : 10ms • 메모리 접근 시간 : 1 sec • 유효 접근 시간 = (1-p) × (1 sec) + p × (10 ms) = (1-p) + 10000 * P sec = 1+9999 * P sec SunMoon University

  15. Performance of Paging(3) • [예] 페이지 부재율 p = 1/1000 1 ㎲ + 9999 P ㎲ = 1 ㎲ + (9999 / 1000) ㎲ = 10.9 ㎲ (약 11 ㎲ ) • 페이지 부재가 전혀 없을 때(P = 0)의 접근 시간 (1 ㎲) 보다 11배 정도 느림 SunMoon University

  16. Performance of Paging(4) • 유효 접근 시간 : 페이지 부재율(page fault rate)에 비례 • 1,000개 중에 1 개 : 페이지 부재 발생 • 유효 접근 시간 : 11 sec(요구 페이징으로 11배 감속) • 10% 감속보다 적게 하려면 다음 조건이 필요 • 1.10 > 1+ 9999 × P • .10 > 9999 × P • P < .00001 SunMoon University

  17. Performance of Paging(5) • 10,000번 중에서 1번의 페이지 부재 발생 비율보다 더 낮게 비율 유지 필요 • 요구 페이징 시스템 • 페이지 부재율을 낮게 유지시키는 것이 중요 • 유효 접근 시간이 증가할수록 프로세스 수행 시간은 늦어짐 SunMoon University

More Related