Hello, I am doing some exercices to understand how the virtual memory and paging works, my question is as follows :
Suppose we use a paged memory with pages of 1024 bytes, the virtual address space is of 8 pages but the physical memory can only contain 4 frames of pages. Replacement policy is LRU.
- What is the physical address in main memory that corresponds to virtual address 4096? and how do you get to that result?
- Same thing as question 1 but with virtual address 1024
- A page fault occurs when accessing a word in page 0, which page frame will be used to receive the virtual page 0?
My trial :
What I got so far for 1. and 2. questions is determine the address in the table (attached as image) for the corresponding pages. So for example I will match virtual address 4096 to page 4, and 1024 to page 1, is this correct?