By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,395 Members | 2,541 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,395 IT Pros & Developers. It's quick & easy.

What is Page FAULTS?

P: n/a
I made a simple test... loaded an image from file and draw it on a form
In mouse move, I just refresh the form.... that cause 1 000 000 page faults
(as task manager shows) in less than a minute.. what is that?

--
Ceers,
Crirus

------------------------------
If work were a good thing, the boss would take it all from you

------------------------------
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Crirus,
Windows uses Virtual Memory management system, that effectively allows the
process in run state to use all the available RAM. The other processes are
put in wait status, while your process is running, and if your process is
requiring more memory then the system has, it stores the status information
of the waiting process on the HDD and allows your process to use their space
in RAM. This swap is called a page fault.
Now, OS gives each process a preset time interval of running (to achieve
multitasking, usually several CPU clock ticks), so after that time quant for
your process is up, the OS put you process in wait status and activates the
waiting processes. The it has to do page faults to reload their status info
into RAM.

The large number of page faults tells me the following:
1. You are rendering HUGE picture.
2. You wrote the app inefficiently so the memory management is struggling to
keep up with memory expansion on each refresh.
3. Combination of the 1 and 2

I hope this explains and good luck
Milan Todorovic

PS. For further understanding of OS memory management see any OS theory book
(e.g. Tannenbaum's Modern Operating System)
"Crirus" <Cr****@datagroup.ro> wrote in message
news:uK*************@TK2MSFTNGP11.phx.gbl...
I made a simple test... loaded an image from file and draw it on a form
In mouse move, I just refresh the form.... that cause 1 000 000 page faults (as task manager shows) in less than a minute.. what is that?

--
Ceers,
Crirus

------------------------------
If work were a good thing, the boss would take it all from you

------------------------------

Nov 20 '05 #2

P: n/a
Well... all I did is the following.. for testing pourpose

(the image is a fullscreen size jpg)

Private myimg As Bitmap
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
myimg = Bitmap.FromFile("1.jpg")
End Sub

Private Sub Form1_Paint(ByVal sender As Object, ByVal e As
System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
e.Graphics.DrawImage(myimg, 0, 0, myimg.Width, myimg.Height)
End Sub

Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseMove
Me.Refresh()
End Sub
How can I handle a full screen image other way to display in a maximized
form?!

--
Ceers,
Crirus

------------------------------
If work were a good thing, the boss would take it all from you

------------------------------

"Milan Todorovic" <mi*************@ttu.edu> wrote in message
news:OZ**************@tk2msftngp13.phx.gbl...
Crirus,
Windows uses Virtual Memory management system, that effectively allows the
process in run state to use all the available RAM. The other processes are
put in wait status, while your process is running, and if your process is
requiring more memory then the system has, it stores the status information of the waiting process on the HDD and allows your process to use their space in RAM. This swap is called a page fault.
Now, OS gives each process a preset time interval of running (to achieve
multitasking, usually several CPU clock ticks), so after that time quant for your process is up, the OS put you process in wait status and activates the waiting processes. The it has to do page faults to reload their status info into RAM.

The large number of page faults tells me the following:
1. You are rendering HUGE picture.
2. You wrote the app inefficiently so the memory management is struggling to keep up with memory expansion on each refresh.
3. Combination of the 1 and 2

I hope this explains and good luck
Milan Todorovic

PS. For further understanding of OS memory management see any OS theory book (e.g. Tannenbaum's Modern Operating System)
"Crirus" <Cr****@datagroup.ro> wrote in message
news:uK*************@TK2MSFTNGP11.phx.gbl...
I made a simple test... loaded an image from file and draw it on a form
In mouse move, I just refresh the form.... that cause 1 000 000 page

faults
(as task manager shows) in less than a minute.. what is that?

--
Ceers,
Crirus

------------------------------
If work were a good thing, the boss would take it all from you

------------------------------


Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.