Features Provided by Virtual Memory
CPE 315
Professor Stearns
- Programs can access memory locations > address space addresses.
For example, a 16-bit program can be loaded and executed in memory addresses
larger than 64K. Remember, even with virtual memory, a program cannot
be larger than the CPUs address space.
- Relocation
Programs can be loaded anywhere in memory without the need to
relocate the code; virtual memory will perform the address translation at
run-time.
- Paging
Operating systems can divide programs into pieces and manage
those pieces with simple allocation algorithms.
- Protection
Virtual memory makes it impossible for one program to
access the memory locations of another program. Access bits
in the page table (typically, X R W) also can protect a program from itself.
- Code sharing
Multiple processes can use the same code. For example,
many users can share one copy of the C compiler.
- Data sharing
Multiple programs can share the same data; unix pipes are
a good example of data sharing between programs.
- Only part of a program need be in memory (demand paging)
The operating system can load pages as they are needed. Don't
confuse this feature with swapping; swapping means the entire program
is moved to disk.
- Using demand paging, a program can access addresss
space > physical memory
You can write programs larger than memory; this is a
great marketing ploy but, in practice, is not particularly important.
Last updated on 8/18/99