A system and method of improving fault-based multi-page pre-fetches are
provided. When a request to read data randomly from a file is received, a
determination is made as to whether previous data has been read from
memory (i.e., RAM) or from a storage device. If the data has been read
from memory, an attempt is made to read the present requested data from
memory. If the data is in memory it is provided to the requester. If the
data is not in memory, a page fault occurs. If the requested data has a
range that spans more than one page, the entire range is read in by a
page fault handler. If previous data has not been read from memory, it
will be assumed that the present requested data is not in memory. Hence,
the present requested data will be loaded into memory. Loading random
data that spans a range of more than one page all at once into memory
inhibits the system from pre-fetching on the range due to fault-based
sequential data accesses.