I think I'm missing a fundamental concept of how the OS manages memory.
- OS is responsible for keeping track of what parts of physical memory are free.
- OS creates and manages page tables, which have mappings between virtual to physical addresses.
- For each instruction that specifies a virtual address, the hardware reads the page table to get the corresponding physical address. One way the hardware may know the location of the current page table is by a register that the OS updates.
This makes sense for how processes access memory. However, I don't understand how the OS itself accesses memory.
Assuming it uses the same instructions, the hardware would still be translating from virtual addresses to physical? Is there, for example, a known physical location for a page table for the OS itself? I know the question is murky, having trouble even understanding what to ask.