Common Virtual Memory Questions and Solutions

Virtual memory is an operating system feature that allows a process to utilize the Random Access Memory (RAM) address space that does not rely on other processes launched and running in the same operating system. It also uses a space that is bigger than the actual RAM present, while temporarily downgrading some contents from the RAM to the disk, with little or possibly no overhead at all. The importance of virtual memory gives rise to several questions that need answers and solutions. Here are some of them:

Question 1: What is a virtual memory and when is it utilized?

Answer: Virtual memory is a special computer system technique that gives the impression that any application program has address space or contiguous working memory, while the real thing is that it may physically be fragmented and even overflow to the disk storage. Systems using this technique make large application programming easier and use physical memory such as RAM more efficiently compared to those that do not have virtual memory. Virtual memory is significantly different from memory virtualization in that the virtual memory allows the computer resources to be virtualized as the specific system's memory.

Question 2: What is demand paging?

Answer: In operating systems language, demand paging is the application of the virtual memory. In any system using demand paging, the operating system becomes capable of copying a disk page into the physical memory if there was an attempt to access it. It follows the principle that a process starts the execution with none of the demand pages in the physical memory. More page faults are likely to occur until finally most of the working sets of pages in process are located in the physical memory.

Question 3: When should the pages in the memory be replaced?

Answer: When there is an occurrence of a page fault, the operating system loads the faulted page from the disk into the page frame of the memory. At some point, the process has already used all the allowable page frames. This is likely to be lesser than the available memory. When this occurs, the operating system must replace the page for each of the faulted page.

Question 4: What is the working set model?

Answer: A working set model is a set of information at a given time as a collection of pieces of information referenced by a process on a time interval. Generally, the sets of information being questioned are considered as the memory pages. This is the approximate set of pages the process has to access in the future. It is also said to be the indication of the pages that should be kept in the main memory to allow the progress to be executed in that process. Thus, the working set model simply states that a certain process can be in the Random Access Memory (RAM) if all the pages that are currently being used can be in the RAM as well.

Windows and the Windows logo are trademarks of the Microsoft group of companies.
Microsoft is a registered trademark of Microsoft Corporation in the United States and/or other countries.