> When real memory is exhausted, how does the system choose to swap? Is it
> based on programs which have been idle the longest, use the fewest
> resources, or what? Is there a specific algorithm which is used,
> relating cache, etc? Also, how and when does the system relinquish the
> swapped space when it no longer needs it? Where might I find out about
> these things?
i could try now to explain it, but there is a much better source of
information, the:
New Interactive Kernel Hackers Guide, where you can post your own
questions if you dont understand something [and the thing notificates
people who know the answer, and the answer gets part of the document,
and, and, and, many more] :
http://www.redhat.com:8080/HyperNews/get/khg.html
Cheers, hope it helps, Ingo