• A virtual memory is a technique that allows the execution of process that may not be completely in memory. One major advantage of this scheme is that programs can be larger than physical memory.
  • Virtual memory allows a process to easily share files and address space and it provides an efficient mechanism for process creation. It is not easy to implement, it can decrease the performance if it is used carelessly.
  • The instruction being executed must be in physical memory one way to meet this requirement is to place the entire logical address space in physical memory but It limits the size of program to a size of physical memory. In many cases the entire program is not needed. Programs often have a code to handle unusual error condition. This type of code is generally never executed.
  • Arrays, lists, and tables are often allocated more memory then thy actually need. An assembler symbol table may have space for 3000 symbols although the average program has less than 200 symbols. The ability to execute a program that is only partially in memory will have several advantages like:
  1. A program would no longer be limited to a size of physical memory.
  2. Such user program could take less physical memory so more program could be run at the same time.
  • It will increase CPU utilization and throughput, but with no increase in response time or turnaround time. Running program that is not entirely in memory would benefit both the system and the user. Virtual memory is the separation of user logical memory from a physical memory.
  • In addition to separation logical memory from physical memory, virtual memory also allows files and memory to be shared by several different processes through page sharing. Besides this, the sharing of page allows performance improvement during process creation.
  • Virtual memory is commonly implemented by demand paging. It can also be implemented in a segmentation scheme. Several systems provide a page segmentation scheme where segments are broken into pages. User view is segmentation but the OS can implement this view with demand paging.
  • Fore more information on paging scheme please read my post on “Paging”.