Virtual Memory: Practical Example
The figure on the previous slide shows a logical memory space of $8$ pages, a physical memory space of $4$ frames, and the page table that maps the former to the latter. The size of each page and each frame is $1000$ ($1000$ addresses/bytes).
Let's look at that diagram and answer the following questions:
- The CPU tries to access the physical address that relates to the logical address $7485$. Will a page fault happen? Explain how the computer will check this.
- If there is no page fault, compute the physical address to which the logical address $7485$ is mapped. Otherwise, if a page fault happens, briefly explain what the operating system will do in such a case using at least 1 sentence.
- Answer the questions in parts (a) and (b) for the logical address $159$.
- Answer the questions in parts (a) and (b) for the logical address $3389$.