Tommy McCabe
2004-05-26T22:45:28Z

Swapping, in theory, is actually quite simple. The
memory is borken up into fixed-size pages, or
segments, or whatever you want to call them. Instead
of each program accessing the memory directly, as in
DOS, each program interfaces with a virtual kernel
memory. When a page enters the virtual kernel memory,
the kernel puts it somewhere in the hardware memory.
Because of this interface layer, pages can be wherever
they want in the hardware, but all the program sees is
the virtual address. Also, the virtual memory can be a
lot larger than the hardware memory. So, if the
hardware memory is almost all used, and a program
enters a page in virtual memory, the kernel can put
that page on the hard disk instead of in RAM, and when
the program uses that virtual address, the kernel
fetches the data from the hard drive, and the program
never sees it because the kernel does all the
switching and fetching. An opposite, but harder idea,
is caching- when a file is loaded from the hard disk,
its allocated space in virtual memory, which is
allocated space in real memory, so that the data can
be accessed faster.

__________________________________
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger.