[prev] 47 [next]

Page Faults

Requesting a non-loaded page generates a page fault.

One approach to handling a page fault ...

  • find a free (unused) page frame in memory and use that

   // load page into a free frame ...
   else {
      frameno    = getFreeFrame();
      p->frameNo = frameno;
      p->status  = Loaded;
   }

Assumes that we have a way of quickly identifying free frames

Commonly handled via a free list

Reminder: frames allocated to a process become free when process exits