1 / 9

Virtual Memory

Virtual Memory. Operating Systems Lecture # 8. Multi-tasking OS. 0x9000. OS. 0x8000. MS Word. 0x7000. Excel. 0x4000. Outlook. 0x0000. Virtual Memory. Protection A process should be able to reference its own “address space” Abstraction

arthur-diaz
Télécharger la présentation

Virtual Memory

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 Operating Systems Lecture # 8

  2. Multi-tasking OS 0x9000 OS 0x8000 MS Word 0x7000 Excel 0x4000 Outlook 0x0000

  3. Virtual Memory • Protection • A process should be able to reference its own “address space” • Abstraction • Every process thinks it owns the entire RAM e.g. 0x0000 to 0x9000 • Makes it easier for the compiler to generate object (assembly) code

  4. Virtual Memory • Virtual Memory manager translates the virtual (or fake) addresses Compiler Physical address Address Translation (MMU) Translate Virtual -> Actual RAM virtual address Assembly language Load Store CPU

  5. Memory Manager Compiler Physical address Address Translation (MMU) RAM legal addr? Illegal? Assembly language Load Store virtual address Illegal Access Exception CPU Data

  6. Virtual Memory • Virtual memory makes the compiler job much simpler • Sequential addresses • MMU maps and remaps the virtual addresses to actual memory • If some part of the memory is not used • Memory may be multiplexed between processes • Just as the process abstraction permits the CPU to be multiplexed between processes

  7. Memory Translation Hardware provides two registers and an adder • Keep a base register to remap addresses • Add the current address to the base register address • Protection: Check against an upper bound

  8. Memory Translation Process A 0x3000 0x9000 MMU process A Base: 0x4000 Bound:0x9000 read 0x2000 read 0x3000 0x4000 0x0000

  9. Virtual Memory Physical Memory Virtual memory 0 MMU 0 0 OS 0 0

More Related