From reading your question, it sounds like your misunderstanding is because you do not understand the format of a page table entry.
The memory management unit (MMU) of the CPU divides the physical memory into PAGE FRAMES of some fixed size (typically 512K to 1MB).
The operating system manages PAGES of memory.A page must have the same size as the page frame. User mode processes only see pages; not page frames.
The operating system maintains sets of PAGE TABLES that provide the mapping between the pages and page frames.
In a logical memory system, the bits within an address consists of two bit fields. One bit field identifies the page and the other specifies the byte offset into the page.
When a process accesses an address, the MMU divides it into the two bit field. It then uses the page identifier to look up the what page frame the page is mapped to in the page tables.
. Ie, if I were to index into a "Page entry" (if such a thing even makes sense), what would I get in return?
The page entry (or entry in the page table) specifies the number of the physical page frame.
[This is the part it sounds like you are missing.]
In your example, you discuss a multi-level page table, but for simplicity, let's assume there is no page directory, and just a page table.
In a 32-bit system, the page entry will typically be 32-bit and 64-bits on a 64-bit system. The format of the page entry varies among system but it will likely have bit fields that define:
- The index of the page frame mapped to.
- Bits indicating if the entry is valid.
- A bit the indicates if the corresponding page has been written to.
- Bits the specify the protection for the page.
In your example you have omitted the format of the page table entry.
So once you have the entry, the next step is to get the page frame from it.
In your example, this is 4096 bytes of data.
The MMU could either just use the page frame index to identify the page. Or it could multiply that value by the page size to get the byte that starts the page.
To get the specific byte within the 4096, the MMU uses the offset (bits 0:11 in your example)
The MMU does all this behind the scenes so the process never sees it. One of the chief jobs of the operating system is to maintain the page tables and the entries within them.