So, I have been reading about paging, resident bit and dirty bit. What I got from my understanding is that any page X which is being loaded into the physical memory for the first time would have it's resident bit 0 which means we need to find a corresponding address in the main memory for it. Another page Y is replaced and the physical address of that page Y is assigned to this page X that we are trying to add. My question is when this another page Y when it is loaded again into the main memory from the secondary memory, would it be loaded into the same physical address it previously held or would the MMU give it a new physical address altogether? Wouldn't this mean that every time a page is loaded from the secondary memory, a page fault would occur?
I am just stuck at this one point of understanding.