|
No, a new process will cause real page faults that require stuff to be read into core. For a minor fault to happen, the stuff must already be in core.
Imagine a process running in a cpu. It does i/o and must wait for the i/o to complete. So the cpu finds another process and runs it. When the i/o completes the process will run again. But if the system has several cpus, it may wind up in a different one. The TLB is in the cpu. This cpu is seeing this process for the first time. The cpu will generate lots of page faults and all the kernel needs to do is shove some ptes in this cpu's tlb. I thought this would be the most common case.
But last night I looked this up in a book I have at home called Solaris Internals. The authors say that the most common source of minor faults is from processes that attach shared segments to themselves, particularly shared libraries. This makes sense, shared libraries are very commonly used.
If you do "vmstat -s" you will see that Solaris also has a notion of "micro faults". These are page faults due to illegal addresses and cause the kernel to simply deliver a sigsegv to the offending process. I am not sure if these are counted in the "mf" field of the regular vmstat output. That book ignores them.
|