Quote:
Originally Posted by daudiam
Its incorporated back into the main memory (at the cost of some other page) but its assigned a new virtual address
|
No. It keeps its original virtual address.
Quote:
Originally Posted by daudiam
how can the process know that its a page fault
|
When the page is taken out of that process's resident set (prior to being physically swapped out) the kernel sets the page table entry for that virtual page of that process to fault. But that fault is handled later by the kernel, so the user code in the process doesn't know about it.
Quote:
Originally Posted by daudiam
1. Any process larger than 2GiB can't be accommodated since each process is given only 2GiB virtual addresses.
|
Depends on the OS, the architecture, and maybe the program.
2GiB is the default limit for 32 bit Windows. 3GiB is the default limit for 32 bit Linux. Each can be changed.
Quote:
2. If the swap space as well as the main memory gets filled up, the kernel gives an error saying "Virtual memory is low"
|
What OS does that? Some version of Windows?
Quote:
3. The reason swap space is maintained is that if a page fault occurs, the page is first located in the swap space as compared to searching the entire hard disk. If its not found there, then the remaining hard disk is checked.
|
Nonsense.
Swap space is maintained because there are "anonymous" pages, meaning pages that do not correspond directly to a properly sized and aligned chunk of some file.
When a page is out of physical memory, the page table data keeps track of where the page actually is (which part of which file or which slot in the swap file). There is no search and there is no checking one place then another. When it is time to load the page into memory, the kernel knows where to get it.
Quote:
the only reason for the page to be not present in either the swap or the main memory is that it has ended or the process has been killed.
|
More nonsense. See above explanation.
Quote:
5. I take it that "increasing virtual memory" is actually a misnomer because virtual memory is infinite.
|
Virtual memory is not infinite. There are several different related meanings of the phrase "virtual memory" but none of them are infinite and most of them can be increased up to some limit.
Quote:
What is meant is increasing the swap space.
|
What's hard to understand about that? Windows defaults to increasing swap space automatically when it thinks it should (I always turn that feature off and select a good swap size myself). Linux does not increase swap space automatically, but the root user can increase swap space in various ways even on a running system.