读取指令可能导致的页面错误的最大数量?

Maximum number of page faults a read instruction can cause?

A machine-language instruction to load a 32-bit word into a register contains the 32-bit address of the word to be loaded. What is the maximum number of page faults this instruction can cause?

(Tanenbaum, OS, Q 44)

看起来没什么问题,它只会导致 1 个页面错误。当它试图访问 32 位字时。 (我对这个问题的理论,请随意忽略它,因为它可能包含许多错误或混淆的事实。)

请告诉我这道题的正确解法是什么。

单个读取指令可能会触发多个页面错误。理论上从跨越两个不存在的页面的地址读取。

我发现接受的答案很奇怪,因为我不知道页面 table 怎么可能不在主内存中 - 那么您怎么知道去哪里找呢? :\

我上网找到了这些 two links,我想现在我得到的答案或多或少是可持续的。

答案背后的想法是地址指令可以某种方式(越界)属于两个页面table秒。

因此,当包含该地址的这两个页面都不在主内存中时会发生 2 次页面错误,当您尝试寻址位于您之前尝试访问的字中的虚拟地址时会发生另外 2 次页面错误 - 总共4.

我仍然不太确定答案,但这个版本似乎比假设页面 table 可能不在主内存中的已接受答案的版本简单得多(奥卡姆剃刀)。希望对您有所帮助。