0

I hava a concern on page fault handling in operating systems. Say we have two processes A and B running. At some point, a memory access from A causes a page fault. So the OS handles the trap and gets the requested page to the memory and store it in a page frame Y and updates the page table of the process A. But provided that the process B's page table already has a mapping to the page frame Y, how would the process B identifies that the particular page table entry is invalid ?

psaw.mora
  • 868
  • 1
  • 7
  • 18

1 Answers1

0

The operating system has to keep track of which page frames are mapped. Typically, there will be a list of unmapped page frames that would be used to service the request.

The operating system is not going to simply grab a page frame mapped to one process, then remap it to another process without first invaliding the first page mapping (unless the page frame is to be shared by both processes).

user3344003
  • 20,574
  • 3
  • 26
  • 62
  • Do u mean that the OS updates every page table that have used the particular page frame ? If so, can you please provide a link or a book ref for that ? – psaw.mora Feb 11 '16 at 04:29
  • Thanks for the answer. But I found a detail explanation here http://stackoverflow.com/questions/31320289/how-does-the-os-update-the-appropriate-page-table-when-it-evicts-a-victim-page – psaw.mora Feb 11 '16 at 04:38