Virtual Memory Frequently Asked Questions and Solutions
Virtual memory is a complex part of computer programming and it inevitably gives rise to some frequently asked questions.
What is Virtual Memory and How is it Utilized?
Answer:
Virtual memory is a computer feature that allows applications or programs to operate as if they had access to more memory than they actually do. In fact, some features may be scattered and may be located on disk but the virtual memory allows them to run as if they weren't fragmented at all. Virtual memory makes programming applications easier. Computers that utilize virtual memory use physical memory, like RAM (Random Access Memory), much more efficiently and effectively in comparison to computers that do not have virtual memory.
What is Demand Paging?
Answer:
Paging is a process by which your computer manages memory. A "page" is data that is kept in secondary storage. When an attempt is made to access a disk page, your computer's operating system copies that information and places it into its physical memory. When a process is executed, it begins with zero pages in physical memory. As page defaults occur (as many will) most of the process' working information, or pages, is transferred into physical memory.
How Does My Operating System Replace the Pages in Memory?
Answer:
When a page fault occurs, your computer's operating systems loads that faulted page into the memory's page frame. Eventually all of the page frames will be taken and the computer must replace each of the faulted pages.
What is The Working Set Model?
Answer:
The basic premise of the working set model is to prevent "thrashing." Thrashing is when a computer uses an increasing amount of resources to execute a decreasing amount of work.
As a process is carried out on a computer, it references a working set of information at a given point in time during the process. This number is an approximation of the amount of information, or the number of memory pages, that that process will need in order to execute in the future. The computer remembers to keep this amount of information in the main memory for future efficiency. A computer wants to keep enough information in the main memory in order for processes to be carried out simultaneously and efficiently. It also wants to ensure that it doesn't have too much information in the main memory, hampering its ability to operate effectively. The working set model states that a process can be in RAM only if all of its pages can also be in RAM.
Microsoft is a registered trademark of Microsoft Corporation in the United States and/or other countries.