Virtualmemory is a technique used by the operating system to allow a computer to use more memory than what is
physically available to it. It provides a way for the operating system to use a portion of a computer's hard disk as if it were
additional RAM.
In virtual memory, the operating system divides the memory space of a process into small fixed-size blocks called
pages. These pages are loaded into physical memory only when they are needed and swapped out to the disk when they are no longer needed.
When a process requests memory, the operating system first checks if the requested page is already in physical memory. If it is not, the operating system moves the required page from the disk to the physical memory, making room for it by moving some other page to the disk. This process is called page swapping or paging.
Virtual memory allows multiple processes to share the same physical memory by dividing the physical memory into pages and
mapping each pageto a different virtual address space. Each process has its own virtual address space, and the operating system manages the mapping between the virtual address space and the physical memory.
One advantage of virtual memory is that it enables a computer to run more programs or larger programs than it could otherwise, by using disk space as additional memory. Another advantage is that it provides memory protection, which prevents a program from accessing the memory space of another program.
However, it also causes increased overhead due to page swapping, which slows down the system's performance.
Markdown for AI
A clean, structured version of this page for AI assistants and LLMs.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
Virtual memory is a technique used by the operating system to allow a computer to use more memory than what is physically available to it. It provides a way for the operating system to use a portion of a computer's hard disk as if it were additional RAM.
In virtual memory, the operating system divides the memory space of a process into small fixed-size blocks called pages. These pages are loaded into physical memory only when they are needed and swapped out to the disk when they are no longer needed.
When a process requests memory, the operating system first checks if the requested page is already in physical memory. If it is not, the operating system moves the required page from the disk to the physical memory, making room for it by moving some other page to the disk. This process is called page swapping or paging.
Virtual memory allows multiple processes to share the same physical memory by dividing the physical memory into pages and mapping each page to a different virtual address space. Each process has its own virtual address space, and the operating system manages the mapping between the virtual address space and the physical memory.
One advantage of virtual memory is that it enables a computer to run more programs or larger programs than it could otherwise, by using disk space as additional memory. Another advantage is that it provides memory protection, which prevents a program from accessing the memory space of another program.
However, it also causes increased overhead due to page swapping, which slows down the system's performance.