If you mmap (not "read") a file to memory and alter it, no one is going write (page out) the stuff on disk for you. You have to do this yourself by calling msync. (Not sure about what happens when you do munmap though.)so, once the file has been read into memory; if you change the file is the msync called automatically, or periodically? (i guess automatically with an autosave feature, and periodically with no autosave?).
However, there is also no guarantee that it ISN'T going to be written out either. If free and inactive RAM runs low and another process (or even your own process) needs more pages, the VM (Virtual Memory) system will "steal" a page that hasn't been used for a while, even if it is in use. In this case the system will do a page out for you.
The page out information is correct, I believe. It counts the number of times the OS has written a page to either the swap files or to another file. You just have to understand that having a page out does not necessarily mean that you have run out of free RAM...because the page out information is not correcthorrah i understand.
It is more of a hardware thing and (often) not for the OS to decide.believe it or not i was actually going to suggest the size being 4KB. i had a feelingi guess this cant really be altered from program to program - its more of an OS thing? smaller is better i guess for RAM anyway.
Having small pages means that you can model the working set of a process more closely and this saves RAM. (Consider a page where only the first word is used and the rest is never touched.)
http://en.wikipedia.org/wiki/Working_set
However the OS keeps internal tables to track each page in RAM. Each page needs a number of bytes in wired memory to keep track of what the page is used for. This overhead becomes percentually smaller if you use larger pages.
Also if a process uses a large amount of RAM, the number of page faults will increase if the pages are very small. Also, the internal hardware mechanisms that translate virtual addresses to physical addresses can often cache a finite amount of pages. This will also benefit having large pages.
Servers that can host large processes (database servers that access several gigabytes of RAM) can often use "huge pages" which can be megabytes in size to avoid having so many pages to keep track of.
So the page size is more of a tradeoff.