What's the meaning of page fault?

J

john wen

What is the meaning of page fault ? I can only understand
that page fault is something about memory.

John wen
19-8-2003
 
B

BT

Windows sends some memory to the harddrive to a paging file. This is called Virtual Memory. When there is a problem moving between
RAM and the pagefile, that is a page fault and the instruction is usually dumped and the program crashes..
 
D

Dan Seur

BT, that's wrong or at least incomplete. A page fault is the normal
interrupt mechanism whereby the hardware determines that the needed
memory "page" is not actually already in RAM (there's a lookup table in
a CPU register) and must be fetched from the pagefile. The pagefile
generally contains recently used "pages" and its contents are listed in
that table. No crash occurs when the requested page in the lookup table
is found in the pagefile - it's a normal occurrence.

If the requested page listed in the lookup table is not found in the
pagefile, an "Illegal Page Fault" interrupt occurs (something somewhere
got corrupted, either the table or the pagefile) and the process that
called the page is aborted. That's the crash situation; if it's a system
process, the system may crash; if it's an application, the application
will likely crash.

John, this is the second of one of your Computing 101 questions I've
seen today. Again, go find answers elsewhere; these newsgroups are not
here for your personal tutorial convenience. Don't be a pain, huh? These
are not W2k questions. Next you'll be asking how smooth a disk platter
has to be. Learn how to use search engines to navigate the enormous
library we call the web. Your answers are all going to be there, in any
amount of detail you want. Start with www.google.com.
 
P

Paul Dietrich

What is the meaning of page fault ? I can only understand that page fault
is something about memory.

John wen
19-8-2003


This can be a pretty involved subject. But here goes:

First off: Virtual Memory. This is a portion of your hard drive that OSes
(not just Windows) set aside to use to boost available memory beyond the
physical capacity of RAM. Means you can run more and bigger programs.

To accomplish this, the OS may swap from disk to memory when a chunk of
memory is requested. If the segment is not already in RAM, it is brought
in from Disk. This operation is called a PAGE FAULT.

This is important because the access time form RAM is on the order of
nanoseconds (billionths), Whereas disk access time can be in micro-or even
milliseconds.

Therefore, it is important to minimize disk swapping. This is why having
more RAM boosts performance.

A PAGING OS divides memory into evenly-sized chunks called pages. A
SEGMENTED OS has unevenly sized Chunks, called segments.

Why bother with Virtual memory? Disk space is far cheaper per megabyte than
RAM.

Incidently, this same principle applies at even lower levels. Called L1 and
L2 cache.

There are many different algorithims to determine when, exactly to swap a
peice out of memory, and into disk.
I'm not going there, cause that would take up another page of typing.

Also, read Dan's post. It has more computerese, but it is quite accurate.
 
M

Mark V

john wen wrote in
What is the meaning of page fault ? I can only understand
that page fault is something about memory.

OT and just for levity's sake... :)

The King's messenger was always blamed for misquoting the communique.
A Page Fault.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top