@mav3 : If u wanna learn the whole concept of Virtual memory, then I suggest u read "Operating Systems by Galvin".
To make u understand in short : Cache memory is the fastest memory that is used to store page tables, RAm is slower than cache memory and holds the applications environment,processes etc. Hardisk is slower than RAM. Now when u keep opening applications u open a lotta processes. These processes need memory to work! Now suppose ur RAM size is 64 MB and u opened winamp,3 internet explorer pages, a chess program etc which need a total 70 MB memory to work. U keep listening to winamp and work on one IE page for sometime. Under these conditions since ur memory usage is exceeding 64 MB, its essential to have Virtual Memory. Now pagefile or swap file is nothing but some space on hardisk allocated by OS that fools the programs that u have more than enough RAm to work! When u work as highlighted above, the chess program and 2 IE pages go to background and become part of the virtual memory and reside in the hardisk swap u allocated. When u switch from one IE page to other, the IE page from pagefile is swappedand brought under active working and the active one goes to pagefile. Hence the term "swap file"!
So this is the simple concept of pagefile or swap file! Virtual memory = RAM memory + pagefile size! U must have noticed, that when the system is heavily loaded and winamp is ON, there are pauses felt in the song. When u relieve the system of the load then everything works fine. Thats coz all the processes in the heavily loaded system demand for active working then, and need to be executed in the RAM memory. Since the RAM is limited, the processes are "scheduled" to be executed via various scheduling algorithms! So the winamp process is scheduled, executed and scheduled again to be executed. Since there are many active processes executing one by one, the time delay between the winamp process executions become large because of which u experience pauses!
I hope the concept is somewat clear to u!
Thats why it is much better to increase RAM than increasing Virtual memory size by increasing pafgefile size! If u encounter low memory screens, then remove the unwanted and useless startup programs (processes) or increase ur RAm or increase ur pagefile size!
But since hdd are much slower than RAM u'll experience a great degradation in performance by increasing VM! WHich one do u find fast XP on 64 MB RAM or XP on 512 MB RAM??
I hope u got mah point!