Who cares whether virtual memory is greater or less than swap area? What difference does that make? (If you, say, map a 2GB file read-only, that uses 2GB of virtual memory, but no swap space and only trivial amounts of physical memory is needed.)
The OS simply extends the process' virtual memory space. It's just changing an accounting entry. Physical memory is not needed until an attempt is made to modify the contents of the address space. (Actually, the process will likely do this itself, only asking the OS to extend its virtual memory space when it needs larger chunks.)
They remain in physical memory (assuming they faulted in to begin with) until the operating system elects to move them elsewhere or discard them. If they are moved elsewhere or discarded, they are paged back in or recreated when they are accessed through page faults. (The OS manages physical memory as a precious resource, granting it as it thinks best.)
By the way, on most 32-bit OSes, the OS itself takes 1GB or 2GB of that virtual memory space, leaving only 2GB or 3GB truly usable by the process. On 64-bit OSes, the OS doesn't take any of that space, so the full 4GB is available to 32-bit processes.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…