homework7-2016329621041 Version 0 |
|
👤 Author: by 1402620506qqcom 2019-11-12 08:01:47 |
When page fault happens in virtual memory management, what is the steps of OS to handle this situation?
1.Check an internal table (usually kept with PCB) for this process to determine whether the reference was a valid or an invalid memory access.
2.If the reference was invalid, OS will terminate the process. If it was valid, but haven’t been brought in that page yet, OS will page it in that page.
3.Find a free frame(by taking one from the free-frame list, for instance)
4.Schedule a disk operation to read the desired page into the newly allocated frame
5.When the disk read is complete. OS will modify the internal table kept with the process and the page table to indicate that page is now in memory.
6.Restart the instruction that was interrupted by the page-fault trap. The process can now access the page as though it had always been in memory.