Virtual Memory is a memory-management scheme where only a portion of the virtual address space of a " resident " process may actually be loaded into physical memory.
In other word, Virtual memory allows execution of partially loaded process. Virtual Memory system routinely provide apparent utilization in excess of 100%! Moreover, the allowable size of the virtual- address space of a single process system.
For Example: The virtual- address space of a process of a VAX computer can be up to 4GB, whereas some early models of VAX supported a maximum of only 8MB of physical memory.
This feat is accomplished by maintaining an image of the entire virtual- address space of a process on secondary storage.
The details of virtual memory management are generally transparent to programmers. Being provides. Being provided with the illusion of a much larger memory than may actually be available, programmers are practically relieved of the burden of trying to fit a program into limited memory. Moreover, the same program may run without reprogramming or recompilation on system with significantly different capacities of installed memory.
The basic idea of virtual memory is to execute partially loaded programs. But does it really make sense? An instruction can be completed only if all code, data, and stack locations that it references reside in physical memory.
"The maximum program execution speed of a virtual memory system can equal but never exceed the execution speed of the same program with virtual memory turned off "
Virtual memory can be implemented as an extension of paged or segmented memory management or as a combination both. Accordingly, address translation is performed by means of page-map tables, segment descriptor tables, or both. The important characteristic is that in virtual memory system some portions of the address space of the running process can be absent from main memory. To emphasize the distinction, the term real memory is often used to denote physical memory. The main visible advantage of the scheme is that programs can be lager then physical memory.
Virtual memory is commonly implemented by demand paging. It can also be implemented in a segmentation system. Demand segmentation can also be used to provide virtual memory.
Virtual Memory enables a computer to be able to compensate shortages of physical memory by transferring pages of data from RAM to disk storage.
Management of virtual memory:
- Allocation policy: How much real memory to allocate to each active process.
- Fetch Policy: Which items to bring and when to bring them from secondary storage into the main memory.
- Replacement policy: When a new item is to be brought in and there is no free real memory, which item to evict in order to make room for the new one.
- Placement policy: Where to place an incoming item.
👍
ReplyDelete