how many page faults may occur attempting to execute an instruction that has two
ID: 3777490 • Letter: H
Question
how many page faults may occur attempting to execute an instruction that has two oprands in memory ,both utilizing indirect addressing ?Include the potential page fault to fetch the instruction from memory.The instruction itself lies on exactly one page.
9. How many page faults may occur attempting to execute an instruction that has two operands in memory, both utilizing indirect addressing? In- clude the potential page fault to fetch the instruction from memory. The instruction itself lies on exactly one page.Explanation / Answer
page fault:
-->When a user attempts to address a page or segment which is not currently in some frame in main memory, that event is called a page fault.
-->The term segment fault can be defined similarly, but there is nothing like a 'segment frame' because there is no standard segment size.
-->page fault occur when a logical address requires that a page be brought in from disk.
-->If an instruction and its operands spans a page boundary, then multiple pages could be needed just for the instruction fetch.
-->Memory references in an instruction touch more pages, and if those memory locations can span page boundaries, then multiple pages
could be needed for operand access also.
-->The worst case involves indirect addressing, particularly where multiple levels of indirect addressing are allowed.
-->Left unchecked, a pointer to a pointer to a pointer to a pointer to a . . . could theoretically touch every page in the virtual address space
in a single machine instruction, requiring every virtual page be loaded into physical memory simultaneously.
-->For this reason architectures place a limit ( say 16 ) on the number of levels of indirection allowed in an instruction, which is enforced with a
counter initialized to the limit and decremented with every level of indirection in an instruction - If the counter reaches zero, then an
"excessive indirection" trap occurs. This example would still require a minimum frame allocation of 17 per process.
-->After a page fault, the operating system searches for a location in memory large enough to hold the segment that is retrieved from disk.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.