How Virtual Memory Works

Virtual memory is one of the best memory management techniques used by any operating system. This technique utilizes the space on the hard disk of the computer for executing programs.

Virtual memory is a memory management technique. To execute any program the operating system needs to load it into the memory (Random Access Memory- RAM ). Now a days all the operating systems are multi-processing and multi-tasking. The operating system is capable of executing many programs simultaneously. This requires large amount memory in the system. This lead to bottleneck situations at times when a user tries to execute many programs simultaneously. To overcome the bottleneck of physical memory, this technique is introduced in computer systems.

From close observation of many programs it has been concluded that the whole program need not be loaded into memory at given point of time. That means to run an application or program seamlessly only the code fraction that is currently required should be there in memory. The portion of the program that is not required at the moment can be swapped out from RAM and the available space can be allocated to some other program. This will allow many program to be run simultaneously even if the system has a small physical memory. This research lead to creation of new memory management scheme known as Virtual Memory (VM) .

Virtual Memory is a space reserved on the hard disk, that is treated as extended RAM by the operating system. The portion of the program or application that are not required at the moment are swapped out to the hard disk ( VM ). If that portion is needed by the operating system in future then that is reloaded into the RAM. Ideally, the size of the VM should be double of the size of the RAM of the system. You can provide as much hard disk space as VM from the available space on your system. But providing more than the double the size of physical memory will not have any impact on the performance. On the other hand, if the size of virtual memory is less than the double of the RAM of the system, then there may be degrade in the performance. Therefore, it is highly recommended that the size of the VM should be exactly double of the size of physical memory.

Benefits of Virtual Memory

This technique is a very useful memory management technique. The benefits of this scheme can be stated as below:

1. Many programs can be executed simultaneously
2. It reduces cost as hard disk is cheaper than RAM

Related Topics:

1. Virtual Memory

2. Virtual Machine


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name: