When page fault happens in virtual memory management, what is the steps of OS to handle this situation?
Page fault mean a page in the current page table but not loaded in to the main memory is called by the process.
At first, the operating system will check if the wanted page is in the page table, if so, then it will check if the wanted page is in the main memory. If not, the handling of page fault starts.
It searches this page in the backing store(hard disk ) then swap this page into the main memory. If there is no enougth free frames in the main memory, one or more frames will be swapped out. Then, the page table is updated.
Finally, we restart this instruction.
