How does Linux's Virtual Memory system handle the following case:
1 Process 1 maps one of its virtual page to physical frame 1.
2 Context switches to process 2.
3 Process 2 use many memory which make kernel swaps out frame 1 and replace with its own content.
4 Context switches back to process 1.
question 1 : How does process 1 knows that it's content of frame 1 is not in memory and needs to do a swap in?
question 2 : who update process 1's pagetable?**new question : When a page is swapped out, Linux uses the corresponding PTE to store enough information to locate the page on disk again.so , if a page is swapped out by Linux kernel.how to update corresponding pagetables who are mapping the page?