2 ms·
I see what you are saying here, although I suppose in this example the email client is probably doing some polling tasks in the background making it less likely
by jiggy2011 15y ago
I see what you are saying here, although I suppose in this example the email client is probably doing some polling tasks in the background making it less likely to be swapped.
Surely it would not be difficult to have a paging algorithm that says something like "this program has no open windows or background tasks in operation you should prefer to swap this application's memory over others", no idea whether this is how it currently works or not?
I suppose there is the overhead of doing the swap operation which you would not need to do if you'd simply dumped the contents of the applications memory on the floor. I guess the memory management algorithm could just swap stuff related to state to disk but dump library code completely and reload this as needed.
Memory is so cheap now that people will usually have more of it than they are actually using at any one time so it probably makes sense where possible to still hold recently used applications (state + libs etc) in there if there is no contention for the memory.
I think my overarching point is that OS programmers are pretty smart , I would be slow to assume that they screwed something up in such an obvious way.