Virtual memory mechanism uses the following three basic concepts for its realization :-
1. The On-Line Secondary storage device having much larger capacity than main memory.
2. Swapping is the process of transferring a block of data from secondary storage device to main memory and vice-versa. When the O/S transfers data from secondary storage to main memory, it is called swapping-in of data and opposite is calkled swapping-out of data.
3. In virtual memory system, the O/S partitions all process into pages,which recides on secondary memory storage. The O/S partitions the physical memory (RAM) into page frames of same size. Now instead of loading whole process in RAM, it swap only that page of process which is demanded by processor. This process is known as Demand paging.
In mechanism of virtual memory O/S manages memories in such a way that user feel that they have access to a single, large, and fast main memory. This is done by treating a part of secondary memory as the main memory. In this scheme, User can load the bigger size processes than the available main memory by having the illusion that the memory is available to load the process. Instead of loading one big process in the main memory, the Operating System loads the different parts of more than one process in the main memory.
In modern word, virtual memory has become quite common these days. In this scheme, whenever some pages needs to be loaded in the main memory for the execution and the memory is not available for those many pages, then in that case, instead of stopping the pages from entering in the main memory, the O/S search for the RAM area that are least used in the recent times or that are not referenced and copy that into the secondary memory to make the space for the new pages in the main memory. Since all this procedure happens automatically, therefore it makes the computer feel like it is having the unlimited RAM.
ii> The degree of Multiprogramming will be increased.
iii> There is no need to buy more memory RAMs.
iv> A process may be larger than all of main memory.
DISADVANTAGES :-
i> Difficult to implement.
ii> The system becomes slower since swapping takes time.
ii> It takes more time in switching between applications.
iii> The user will have the lesser hard disk space for its use.
v> It may decrease performance rather than increase unless used carefully.
Comments
Post a Comment
Please comment.