memory-managementoperating-systempagingpage-fault

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)

It looks like no brainer, it'll cause only 1 page fault. When it is trying to access the 32 bit word. (My theory regarding this question, please ignore it at will as it may contain many wrong or confused facts.)

Please tell me what is the correct solution of this question.


Solution

  • A single read instruction could trigger multiple page faults. Theoretically reading from an address which spans over two pages that are not present.