locked
page fault RRS feed

  • Question

  • Hello everyone,

     


    I can understand hard page fault is we need to load from page file into working set (RAM). But what is a soft page fault? I am confused.

     


    thanks in advance,
    George

    Thursday, January 10, 2008 6:06 AM

Answers

  • Imagine a situation in which two or more processes open the same file and one might need to update it without affecting the copy the other process has open. What they can do is share one copy but mark that particular bit of memory as being copy-on-write. When a process decides to change it, Windows will automatically duplicate the shared page and update the address space of the writing process so that the writes go to the new copy.

     

    Friday, January 11, 2008 9:52 AM

All replies

  • A soft page fault is when the request can be satisfied without reading from disk. This might be because it's a new empty page which can be obtained from the Zero Page List or by clearing some ram, a copy-on-write page that has just been written to for the first time, or it may be because it is a shared page (part of a dll etc) which is already in memory but hasn't yet been mapped into the current process address space,

     

    Thursday, January 10, 2008 11:41 AM
  • Thanks AndyCadley,

     

     

    I agree and understand all of your points, except this one, what means " a copy-on-write page that has just been written to for the first time"?

     

     AndyCadley wrote:
    A soft page fault is when the request can be satisfied without reading from disk. This might be because it's a new empty page which can be obtained from the Zero Page List or by clearing some ram, a copy-on-write page that has just been written to for the first time, or it may be because it is a shared page (part of a dll etc) which is already in memory but hasn't yet been mapped into the current process address space,

     

     

     

    regards,

    George

    Thursday, January 10, 2008 12:51 PM
  • Imagine a situation in which two or more processes open the same file and one might need to update it without affecting the copy the other process has open. What they can do is share one copy but mark that particular bit of memory as being copy-on-write. When a process decides to change it, Windows will automatically duplicate the shared page and update the address space of the writing process so that the writes go to the new copy.

     

    Friday, January 11, 2008 9:52 AM
  • Thanks AndyCadley,

     

     

    Your reply is great! My question is answered.

     

     AndyCadley wrote:
    Imagine a situation in which two or more processes open the same file and one might need to update it without affecting the copy the other process has open. What they can do is share one copy but mark that particular bit of memory as being copy-on-write. When a process decides to change it, Windows will automatically duplicate the shared page and update the address space of the writing process so that the writes go to the new copy.

     

     

     

    regards,

    George

    Friday, January 11, 2008 2:46 PM