Presentation is loading. Please wait.

Presentation is loading. Please wait.

Virtual Memory Operating Systems Lecture # 8. Multi-tasking OS OS Excel MS Word Outlook 0x0000 0x7000 0x4000 0x8000 0x9000.

Similar presentations


Presentation on theme: "Virtual Memory Operating Systems Lecture # 8. Multi-tasking OS OS Excel MS Word Outlook 0x0000 0x7000 0x4000 0x8000 0x9000."— Presentation transcript:

1 Virtual Memory Operating Systems Lecture # 8

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

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 virtual address CPU Assembly language Load Store Translate Virtual -> Actual Physical address RAM Address Translation (MMU)

5 Memory Manager Compiler virtual address CPU Assembly language Load Store legal addr? Illegal? Physical address RAM Address Translation (MMU) Illegal Access Exception 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 0x0000 Process A 0x3000 0x4000 process A read 0x3000 read 0x2000 0x9000 Base: 0x4000 Bound:0x9000 MMU

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


Download ppt "Virtual Memory Operating Systems Lecture # 8. Multi-tasking OS OS Excel MS Word Outlook 0x0000 0x7000 0x4000 0x8000 0x9000."

Similar presentations


Ads by Google