How to artificially cause a page fault in linux kernel?
Let’s learn how to artificially cause a page fault in linux kernel. The most accurate or helpful solution is served by Stack Overflow.
There are ten answers to this question.
Best solution
I am pretty new to the Linux kernel. I would like to make the kernel fault every time a specified page 'P' is being fetched. One simple conceptual idea is to clear the bit indicating the presence of page 'P' in Page Table Entry (PTE). Can anyone provide more details on how to go about achieving this in x86? Also please point me to where in the source code one needs to make this modification, if possible. Background I have to invoke my custom page handler which is applicable only for handling...
Answer:
I have not played with the swapping code since I moved from Minix to Linux, but a swapping algorithm...
Paarth at Stack Overflow Mark as irrelevant Undo
Other solutions
Kernel cannot handle its own page fault. That is the reason why we have to use copyt_to_user and copy_from_user. Why can't it do as following: If a page fault happens an interrupt will be raised and that invokes the kernel , now the kernel can load...
Answer:
A very detailed explanation can be found at:https://www.kernel.org/doc/Docum...This explains the handling...
Udipta Das at Quora Mark as irrelevant Undo
I want to know, given an address X, how does the Linux kernel figure out that X is an mmaped page? Is there a special flag in the page table entry? Does the access generate a page fault ? If so, how does the handler find out it is an mmaped address?
Answer:
When you first access an mmaped page, the page fault handler runs. On most architectures, this invokes...
Robert Love at Quora Mark as irrelevant Undo
Today my mom was using our Mac OS X computer. The sound, as of recently, has been randomly turning on and off. So we restart the computer, and it fixes it. Today my mom restarted to computer to fix the sound, and it popped up with a kernel panic that...
Answer:
Corrupted OS file or resource seems the most likely cause. It seems to be saying that the hardware is...
Basch at Yahoo! Answers Mark as irrelevant Undo
A minor page fault is definitely cheaper than a major page fault because it just needs to update the page table and needs not read from disk (a major page fault does). A read from main memory should be faster than any of the page fault situations but...
Answer:
The expense of a page fault is dependent on its type. Simple access to memory for which there is no...
Creed Erickson at Quora Mark as irrelevant Undo
How can one intercept calls made by Kernel module to kernel without kedr using kernel module in c. Or rephrase it as how can one create interface between kernel and Linux Kernel Module (LKM).
Answer:
Can you be please more specific about the interface you need, what it does and what are its functionalities...
Nitin Chaudhary at Quora Mark as irrelevant Undo
I have read understanding the linux kernel book, but still I don't understand how I/O is handled. Below are few confusion points. I/O devices 1. How is DMA involved in I/O transfer? 2. How does Asynchronous I/O read works? I mean how does OS know which...
Answer:
I'd like to recommend two textbooks which cover a lot of this material: Computer Organization and Design...
Andrew Wang at Quora Mark as irrelevant Undo
I just want to know what are new thing incorporates in kernel 3.0-rc3 or what are the differences between kernel 2.6.xx and kernel 3.0-rc3.
Answer:
While Mr. C is correct I might mention some fun I've been having since reinstalling Slackware to illustrate...
5QZ33QLKOHEAPERMKZVX4WJTCU at Yahoo! Answers Mark as irrelevant Undo
Again : I have debian linux with a 2.4 kernel (i think) and during the installation of this version i installed the desktop enviroment package. I saw that there was a webserver option but i didnt select it at that time but i now want to install that...
Answer:
Hello, Try uname -a, to find out what version of the kernel you are using. You have big plans for something...
David at Yahoo! Answers Mark as irrelevant Undo
I have been working with linux kernel for quite sometime. I have completed some books (esp. Linux Kernel Development by Robert love and LDD3e by Rubini). I have been reading linux codes. I am able to write simple linux drivers and do other basic things...
Answer:
Since Linux is an open-source project, you should consider looking into existing bugs, feature requests...
Costya Perepelitsa at Quora Mark as irrelevant Undo
Related Q & A:
- How to boot linux kernel without bootloader?Best solution by Super User
- How can I make a page my home page?Best solution by Yahoo! Answers
- How do you save a page as a tab?Best solution by Answerbag.com
- How do you print a page?Best solution by Yahoo! Answers
- How do you make a page on facebook?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.