On Jun 19, 2008, at 11:47 AM, David Ledger wrote: > --------------------- > SNIP---------------------------------------------------------- > Other than memory mapped file I/O I'd be interested to know what > these other reasons are. > > David > > The one or two that come to the top of my mind (there are others of course) are 1. The application tells the OS that the page will not be used in quite a long time (perhaps an error routine that is never(?) to be invoked) 2. The OS sees a wait issued by the application and due to other issues (like cpu busy, etc) decided to swap the entire application out. Some of the types of wait are either I/O and or waiting on input from the user. If the system is overloaded say by cpu usage then the system looks at the the applications that are not doing anything and frees up memory by swapping those applications out or another reason is that the OS keeps track of a a "routine" and if its no longer in use it it moves it to the ready "que" to be paged out que and so long as the use count does not go up by the time its ready to be paged it is paged out or depending on how the OS is written maybe just the page is freed and when the routine is need again it is paged in from the swap file, again it depends on how sophisticated the OS is. It maybe just because the application says I am stopped and can go no further until an external event occurs like a time expiring at say 2 hours later(ICAL might be an example here). The MAC internals on scheduling is not externally published so there may be others as well, its difficult to say what was architected into the OS do I can only guess based on how other systems that *ARE* externalized. I posted a lengthy pageout response yesterday and it was held for length restrictions. Maybe that will answer the question as well. Ed