Temporary files: RAM or disk?
Temporary files: RAM or disk?
Posted Jun 8, 2012 0:15 UTC (Fri) by giraffedata (guest, #1954)In reply to: Temporary files: RAM or disk? by quotemstr
Parent article: Temporary files: RAM or disk?
I've often wished for some hack that would just do a sequential read through the swap file to load one process back into memoryWindows 8 will do that for modern applications.
When njh says "hack" I think it means something an intelligent user can invoke to override the normal system paging strategy because he knows a process is going to be faulting back much of its memory anyway.
The Windows 8 thing is automatic, based on an apparently pre-existing long-term scheduling facility. Some applications get long-term scheduled out, aka "put in the background," aka "suspended," mainly so devices they are using can be powered down and save battery energy. But there is a new feature that also swaps all the process' memory out when it gets put in the background, and the OS takes care to put all the pages in one place. Then, when the process gets brought back to the foreground, the OS brings all those pages back at once, so the process is quickly running again.
This of course requires applications that explicitly go to sleep, as opposed to just quietly not touching most of their memory for a while, and then suddenly touching it all again.