Hence in a virtual memory system all processes are

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: factors have to be properly balanced to decide a suitable page size. Virtual Memory What is Virtual Memory? In all the memory management schemes discussed till now, a process was loaded into the main memory for execution only when sufficient free memory (contiguous or non-contiguous) was found to be available to load the entire process. These schemes suffer from the following two main limitations: 1. A process cannot be loaded and has to keep waiting for its execution to start until sufficient free memory for loading the entire process becomes available. This may delay a process's turnaround time to a great extent. 2. A process cannot be loaded (and hence executed) in a system whose main memory size is less than the total memory required by the process. Virtual memory is a memory management scheme that overcomes the above mentioned limitations by allowing the execution of processes that might not be completely loaded in the main memory. That is, it does not require the entire process to be in memory before the process can execute. How is Virtual Memory Realized? The three basic concepts used for the realization of virtual memory are: 1. On-line secondary storage. It is a secondary storage device whose capacity is much larger than the main memory capacity and which is always kept on-line to the system. A high-speed disk storage is usually used for this purpose. 2. Swapping. Swapping is the process of transferring a block of data from the on-line secondary storage to main memory or from main memory to the on-line secondary storage. When data is transferred from on-line secondary storage to main memory, it is called swapping in of data, and when data is transferred from main memory to on-line secondary storage, it is called swapping out of data. 3. Demand paging. Demand paging is a scheme similar to that of paging scheme with an additional facility of swapping in of pages of a process as and when they are needed during the execution of the process, rather than loading all the pages before starting the process's execution. When there is no free page frame in...
View Full Document

Ask a homework question - tutors are online