There are two types of page faults:
Soft and
Hard. Soft are the best; thus making hard the worst (speaking in
performance terms).
In
paged memory systems there are three levels of memory pages: In
memory, in
cache, and on
disk. Most people are familiar with the in
memory / on disk concept. However, most paged memory
implementations keep a few recently used memory
blocks in a page pool that gets written to disk when they are untouched for a certain amount of
time. Basically, it's a
collection of pages that are on their way out. When requesting a
bit of memory that is not in the main memory
banks, it goes to the
page pool to see if it is a
recent main memory visitor. If so, a
soft page fault occurs, and the page is placed back into
memory from
memory (a quick
operation). Pages not even in the pool have to be
fetched from disk, causing a
hard fault. This is the
slowest and most
horrible of operations for a
computer and should be avoided at all costs. Too many hard page faults are often referred to as "
thrashing".