首页 > 试题广场 >

Suppose that a machine provide

[问答题]
Suppose that a machine provides instructions that can access memory locations using the one-level indirect addressing scheme. What is the
sequence of page faults incurred when all of the pages of a program are currently non-resident and the first instruction of the program is an indirect memory load operation? What happens when the operating system is using a per-process frame allocation technique and only two
pages are allocated to this process?

推荐
The following page faults take place: page fault to access the instruction, a page fault to access the memory location that contains a pointer to the target memory location, and a page fault when the target memory location is accessed. The operating system will generate three page faults with the third page replacing the page containing the instructtion. If the instruction needs to be fetched again to repeat the trapped instruction, then the sequence of page faults will continue indefinitely. If the instruction is ***d in a register, then it will be able to execute completely after the third page fault.
发表于 2018-03-23 21:57:46 回复(0)