This makes programming task much easier since the

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: the memory to accommodate a page that needs to be swapped in to continue the process's execution, a page-replacement algorithm is invoked to create one for the accessed page. It deals with the process of selecting a victim page that is residing in the memory but is not currently being used. The selected victim page is swapped out to free the page frame it is occupying, which is then used to hold the accessed page of the process. Hence in a virtual memory system, all processes are partitioned into pages and reside on the on-line secondary storage. The physical memory is also partitioned into page frames of the same size. Now instead of swapping in the entire process before its execution can start, a swapping algorithm (called demand paging) is used that swaps in only those pages of a process that are currently needed in the memory for continuing the process's execution. This idea is based on the observation that since the instructions of a program are executed one-by-one, all parts of the program are not needed simultaneously in the memory. Based on the way virtual memory is realized, virtual memory is also often described as a hierarchy of two storage systems - one of them is a low cost, large capacity, low speed system (on-line disk storage), and the other is a high cost, small capacity, high speed system (main memory). The operating system manages the two storage systems in such a way that the users of the system feel that they have access to a single, large, directly addressable and fast main memory. That is, from the point of view of applications programmers, the effective (or virtual) size of the available main memory appears to be unlimited. Advantages and Disadvantages of Virtual Memory Advantages Virtual memory typically has the following advantages: 1. It enables separation of logical memory and physical memory. With this mechanism, a very large virtual memory can be provided for programmers on a system having smaller physical memory. That is, the logical address space is no longer constrained by the ph...
View Full Document

Ask a homework question - tutors are online