To answer one question which has not yet been addressed:
Quote:
|
who will swap back in the modules when they are needed after they got swapped out?
|
There are many things which can get swapped out, not just modules: programs which are being run, the memory they're using, and so forth.
In every case, when a program tries to access a segment of memory that has been swapped out, it's the kernel's job to bring the image of that memory back from swap space into real memory and then schedule the process to continue running.