1 / 27

The UVM Virtual Memory System

The UVM Virtual Memory System. Charles D. Cranor & Gurudatta M. Parulkar. Presented by: Dulan Wathugala 10/07/2004. Who’s who. Charles D. Cranor (Chuck) Senior Technical Staff Member AT&T Labs-Research http://www.netbsd.org/~chuck/. Gurudatta M. Parulkar

wmcneese
Télécharger la présentation

The UVM Virtual Memory System

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. The UVM Virtual Memory System Charles D. Cranor & Gurudatta M. Parulkar Presented by: Dulan Wathugala 10/07/2004

  2. Who’s who Charles D. Cranor (Chuck) Senior Technical Staff Member AT&T Labs-Research http://www.netbsd.org/~chuck/ Gurudatta M. Parulkar Former Professor of Computer Science Washington University in St. Louis http://www.arl.wustl.edu/~guru/

  3. Outline • Tasks of VM. • VM layering. • Data structures used. • Memory Objects. • Page Clustering. • Overall Performance.

  4. Tasks of VM System • Allocate PM to processes. • Deallocate unused memory. • Keep track of who accesses which memory. • Memory protection. • Swap space management.

  5. VM Overview • Small machine dependent layer (pmap) • Programming processor’s MMU • Adding, removing, modifying, and querying the mappings of virtual addresses or of a page of physical memory. • Has no knowledge about higher-level OS abstractions such as files.

  6. VM Overview • Large machine-independent layer. • Shared by all BSD supported processes. • Perform high-level operations of VM system. • Mapping a process’ file mappings. • Requesting data from backing store. • Paging out memory as needed. • Managing copy-on-write memory.

  7. Data StructuresMachine-Independent Layer vmspace memory map pmap map entry stack text bss data Memory Object (Triangle) Page (black circle) zero-fill /sbin/init zero-fill pager pager pager vnode swap swap

  8. $ pmap -x 1

  9. Memory Objects

  10. Caching Conflicts Only 100 objects Last Access time Vnode 4 Vnode 1 object cache 3 Vnode 2 7 Vnode 3 vnode cache

  11. Caching Conflicts – UVM Solution Only 100 objects Last Access time Vnode 4 Vnode 1 object cache 3 Vnode 2 7 Vnode 3 vnode cache

  12. Effect of UVM Object Management

  13. BSD: Copy-on-write: Write faults Initial mapping Write-fault map entry map entry needs- copy needs- copy shadow 1 ./orig_file ./orig_file

  14. Parent me shadow 1 ./orig_file BSD: Copy-on-write: Fork Fork Write fault Child me map entry needs- copy needs- copy shadow 1 ./orig_file

  15. BSD: Write Faults After Fork Parent writes to middle page Child writes to right hand page Parent me Child me Parent me Child me needs- copy needs- copy needs- copy shadow 2 shadow 2 shadow 3 shadow 1 shadow 1 ./orig_file ./orig_file

  16. UVM: Copy-on-write: Write faults Initial mapping Write-fault needs- copy map entry amap/obj needs- copy map entry amap/obj amap 1 1 anon 1 ./orig_file ./orig_file

  17. 2 UVM: Copy-on-write: Fork Write fault Fork needs- copy Parent me amap/obj needs- copy Child me amap/obj map entry amap/obj amap 1 amap 1 1 1 anon 1 anon 1 ./orig_file ./orig_file

  18. 1 UVM: Write Faults After Fork Parent writes to middle page needs- copy Parent me amap/obj needs- copy Child me amap/obj amap 2 1 anon 2 amap 1 2 ./orig_file anon 1

  19. UVM: Write Faults After Fork Child writes to right hand page Parent me amap/obj needs- copy Child me amap/obj amap 2 anon 2 1 amap 1 1 1 ./orig_file anon 1 anon 3

  20. BSD Vs UVM BSD UVM Parent me Child me Parent me amap/obj Child me amap/obj amap 2 shadow 2 shadow 3 anon 2 1 shadow 1 amap 1 1 1 ./orig_file ./orig_file anon 1 anon 3

  21. Pager - Clustering

  22. Page Clustering - Effect Amount of physical memory 32 MB

  23. Overall UVM Performance Reference: C. Cranor. Design and Implementation of the UVM Virtual Memory System. Doctoral dissertation, Washington University, August 1998.

  24. Current Status of UVM • “Implemented in the NetBSD operating system, UVM completely replaces the Mach based 4.4BSD VM system.” [1]

  25. UVM • Has designed efficient data structures. • Has eliminated redundancies. • Delegated work to other kernel subsystems. • Made the VM system more correlated with the OS.

  26. References • http://ccrc.wustl.edu/pub/chuck/tech/uvm • C. Cranor. Design and Implementation of the UVM Virtual Memory System. Doctoral dissertation, Washington University, August 1998.

  27. Chuk’s Full Thesis • The full thesis can be downloaded at http://citeseer.ist.psu.edu/cranor98design.html or http://ccrc.wustl.edu/pub/chuck/tech/uvm/

More Related