W12_23_VirtualMemory-1

W12_23_VirtualMemory-1 - 23. Virtual Memory MH: 7.6 HVZ: 6...

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

View Full Document Right Arrow Icon
23. Virtual Memory H: 7 6 MH: 7.6 HVZ: 6 Department of Computer Science niversity of Victoria University of Victoria
Background image of page 1

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

View Full DocumentRight Arrow Icon
PROGRAM RELOCATABILITY In multiple user ardware aps user address systems, each user program 'appears' to use a ontiguous lock Hardware maps user address space to the physical address space using registers that can only be set by the contiguous block of memory beginning at location 0 operating system User 00…0 Base Reg. Address Space Physical Memory + Limit Reg. The limit reg. supports bounds hecking Î This scheme provides easy program relocation checking 2
Background image of page 2
What is Virtual Memory? Virtual memory is a memory management technique which virtualizes all storage system and makes them appear as one large memory device The side effect is that the main (physical) memory can be seen to act as a cache for the secondary storage 3
Background image of page 3

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

View Full DocumentRight Arrow Icon
Why Virtual Memory? fficient and safe ecrease problems Efficient and safe sharing of memory between multiple programs Decrease problems of having small amount of real memory educe reliance on rotection Reduce reliance on clever programming ± Protection ± Active portion used is only a fraction 4
Background image of page 4
What does Virtual Memory do? ¾ Give an illusion of an essentially unbounded amount of memory ¾ Allow efficient and safe sharing of memory among multiple programs ¾ Remove the programming burdens of a small, limited amount of main memory ¾ Provide relocation , which simplifies loading the program for execution (programs can be loaded into any location) 5
Background image of page 5

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

View Full DocumentRight Arrow Icon
How does Virtual Memory do it? 1. Each program is compiled to its address space . irtual emory implements the translation f a 2. Virtual memory implements the translation of a program’s address space to physical addresses Memory mapping/address translation : CPU produces Hardware/software upport the Resulting in a virtual address support the translation physical adress 6
Background image of page 6
Virtual memory organization Processor Data Virtual address MMU Memory Management Unit Physical address Cache Data Physical address Main Memory DMA transfer isk storage Disk storage 7
Background image of page 7

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

View Full DocumentRight Arrow Icon
How can programs make effective and efficient use of such large address space? ± Not long ago, main memory (RAM) was measured in MB ± But theoretical address space is much larger Î 32-bit addresses can represent 4GB of byte-addressable space Observation: ew programs need all their code and data at once In fact most Few programs need all their code and data at once. In fact, most code and data are accessed rarely: the 90/10 or 80/20 “rules”. Î Solution: ² Only use RAM for “active” code and data. ² Store the rest on disk. 8
Background image of page 8
Virtual Memory: swap space ± Virtual memory is stored in a specialized hard disk image (often called a “swap” partition, or just “swap” space).
Background image of page 9

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

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 49

W12_23_VirtualMemory-1 - 23. Virtual Memory MH: 7.6 HVZ: 6...

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

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