27-11-2012, 06:28 PM
Virtual Memory and Address Translation
Virtual Memory.pdf (Size: 328.85 KB / Downloads: 418)
Virtual Memory
Concept
Key problem: How can one support programs that
require more memory than is physically available?
How can we support programs that do not use all of their
memory at once?
2n-1
Hide physical size of memory from users
Memory is a “large” virtual address space of 2n bytes
Only portions of VAS are in physical memory at any one
time (increase memory utilization).
Issues
Placement strategies
Where to place programs in physical memory
Program
P’s
VAS
Replacement strategies
What to do when there exist more processes than can fit in
memory
Load control strategies
Determining how many processes can be in memory at one
time
Frames and pages
Only mapping virtual pages that are in use does
what?
A. Increases memory utilization.
B. Increases performance for user applications.
C. Allows an OS to run more programs concurrently.
D. Gives the OS freedom to move virtual pages in the virtual
address space.
Address translation is
A. Frequent
B. Infrequent
Changing address mappings is
A. Frequent
B. Infrequent
The Problem of Large Address Spaces
With large address spaces (64-bits) forward mapped page
tables become cumbersome.
E.g. 5 levels of tables.
Instead of making tables proportional to size of virtual address
space, make them proportional to the size of physical address
space.
Virtual address space is growing faster than physical.
Use one entry for each physical page with a hash table
17
Size of translation table occupies a very small fraction of physical
memory
Size of translation table is independent of VM size
Segmentation vs. Paging
Segmentation has what advantages over paging?
A. Fine-grained protection.
B. Easier to manage transfer of segments to/from the disk.
C. Requires less hardware support
D. No external fragmentation
Paging has what advantages over segmentation?
A. Fine-grained protection.
B. Easier to manage transfer of pages to/from the disk.
C Requires less hardware support
30
C. support.
D. No external fragmentation.