Virtual Memory is a storage allocation scheme in which secondary memory can be addressed as though it were part of main memory. The addresses a program may use to reference memory are distinguished from the addresses the memory system uses to identify physical storage sites, and program generated addresses are translated automatically to the corresponding machine addresses.
The size of virtual storage is limited by the addressing scheme of the computer system and the amount of secondary memory is available not by the actual number of the main storage locations.
It is a technique that is implemented using both hardware and software. It maps memory addresses used by a program, called virtual addresses, into physical addresses in computer memory.
If these characteristics are present then, it is not necessary that all the pages or segments are present in the main memory during execution. This means that the required pages need to be loaded into memory whenever required. Virtual memory is implemented using Demand Paging or Demand Segmentation.
The process of loading the page into memory on demand (whenever page fault occurs) is known as demand paging.
The process includes the following steps
Hence whenever a page fault occurs these steps are followed by the operating system and the required page is brought into memory.
Page Fault Service Time
The time taken to service the page fault is called as page fault service time. The page fault service time includes the time taken to perform all the above six steps.
Recovery of Thrashing
10 videos|99 docs|33 tests
|
1. What is virtual memory in an operating system? |
2. What is swapping in the context of virtual memory? |
3. What is thrashing in the context of virtual memory? |
4. How does virtual memory improve system performance? |
5. What are some advantages of using virtual memory in an operating system? |
|
Explore Courses for Computer Science Engineering (CSE) exam
|