If CPU request for a particular page and that page is not found in main memory then it will be a page fault situation. Then OS loads that page from hard disk to main memory. At the time of loading of that particular page form Secondary memory to main memory CPU sit idle. Because loading of that particular page form Secondary memory to main memory id done by OS. Due to CPU idleness System performance decrease.
Page Fault example
Let suppose CPU generate a logical address 0111. Where the first three bits (011) is the page number and last bit (1) is the offset. Keep in mind, 011 means 3rd page and 1 mean 2nd byte of 3rd page.
If the requested page is not present in main memory then page table have no corresponding frame. It is the page fault situation. As shown in diagram given below.
Now a trap is generated which request to OS to load that particular page from secondary memory to main memory as shown in the diagram given below
As the requested page is loaded in the frame of main memory, Page table is updated which assign frame number from main memory. look at following diagram,
Now the physical address is generated as shown in the diagram given below. It is already discuss in the concept of Paging.
Note: If the number of page fault are increases then the effective access time of the system will also increase.