Virtual memory is a procedure that permits the execution of processes that are not entirely available in memory. The main visible benefit of this system is that programs can to be larger than the physical memory. Virtual memory is the separation of the user logical memory from physical memory. This separation provides an extremely important virtual memory for programmers only a smaller physical memory is available. Here are the situations, when the whole program is no need to be fully loaded into main memory.
- The user written error handling routines are only used in case of error Calculation.
- Some options and features of a program can be used infrequently.
- Many tables are assigned to a fixed amount of address space, even if the amount of the table is actually used.
- The ability to run a program that is only partially in memory.
The prerequisite that instructions should be in physical memory to be executed seem like both reasonable and necessary; however, it is also unfortunate, since it bounds the size of a program to the size of physical memory. Consider the following:
■ Arrays, tables, and lists are frequently allocated more memory than they actually required. An array might be declared 100/100 elements, although it is rarely larger than 10/10 elements. An assembler symbol table might have room for 3,000 symbols, even though the average program has less than 200 symbols.
■ Virtual memory – partitioning of user logical memory from physical memory the part of secondary storage used as an main memory.
– Logical address space can then, be much larger than physical address space
– Permits address spaces to be shared by numerous processes
– Permits for more effective process creation
– More programs running simultaneously in concurrent manners.
- Fewer I / O would be required to load or exchange each user program in memory.
- A program would not too long to be reserved by the amount of physical memory available.
- Each user program can take less physical memory, more programs at the same time, with a corresponding increase in CPU utilization and throughput.