2019327100017朱奕名homework11 Version 0 |
|
👤 Author: by 1114774057qqcom 2021-12-30 05:05:47 |
Page missing interrupts will be handled by pagefaulthandler, which will handle them differently according to different types of page missing interrupts:
Hard page fault, also known as major page fault, is translated as hard page missing error / main page missing error. At this time, there is no corresponding page frame in the physical memory. The CPU needs to open the disk device to read it into the physical memory, and then let the MMU establish the mapping between VA and PA.
Soft page fault, also known as minor page fault, is translated into soft page missing error / secondary page missing error. At this time, there is a corresponding page frame in the physical memory, but it may be called in by other processes, and the process issuing the page missing exception does not know. At this time, the MMU only needs to establish a mapping without reading and writing to memory from the disk. It generally appears in the multi process shared memory area.
Invalid page fault is translated as an invalid page missing error. For example, the memory address accessed by the process is out of bounds. For example, dereference to the null pointer, the kernel will report a segment fault error, interrupt the process and hang up directly.