LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-15-2010, 10:12 PM   #1
golmschenk
Member
 
Registered: Nov 2009
Posts: 144

Rep: Reputation: 15
Page Faults vs. Page Ins


I've written a program for a class and after we've written it we're suppose to do some data analysis on it. A couple of the several things we're suppose to report given different conditions are the number of page faults and the number of page ins/page outs. Are there times when a page fault occurs that that you don't have a page in? What all is the difference? Thanks!
 
Old 07-15-2010, 11:09 PM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

Q: What is the definition of a "page out"? (that's easy )

Q: What is the definition of a "page in"?
Under what circumstances might it occur?

Q: Let's say you write a program that might allocate 2GB.
Do you believe the entire 2GB is allocated all at once, the moment the program starts? If not, why not?

Q: Back to the question of "page in": what might happen if I have a memory-mapped file (and plenty of RAM, and 0 swap being used)?

Q: Another question about "page in": where does a program's static data and and constants come from? Do you think they're allocated all at once, up front?

Q: What about shared libraries a program might use?

Thoughts for your consideration

Here's a great link (one I'm sure you've already encountered):
http://tldp.org/LDP/tlk/mm/memory.html

'Hope that helps .. PSM
 
Old 07-16-2010, 02:32 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,131

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Quote:
Originally Posted by golmschenk View Post
Are there times when a page fault occurs that that you don't have a page in? What all is the difference?
Yes - Linux distinguishes major and minor faults. The latter do not require a page-in.

As for the difference, I presume that is what your teacher wants you to investigate. You now have some terminology to google.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: This week at LWN: Speculating on page faults LXer Syndicated Linux News 0 01-27-2010 11:00 AM
Page faults Oded Kahana Linux - Newbie 2 09-14-2008 12:14 PM
Number of Page Faults based on pid cbridgerg00 Programming 0 11-10-2007 12:55 PM
Page faults in Wine? navaburo Linux - Desktop 0 08-20-2006 04:24 PM
will adding more ram reduce the number of page faults? jwn7 General 2 01-16-2005 04:31 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration