0
votes

I know that we can use virtual address as index to search page table and get physical address (page frame number to be precise) from the corresponding entry. And the location of page table in memory is provided by page table base register(PTBR).

For small page tables stored in continuous physical memory, we can address a page table using (page number to be indexed + base address of page table) in physical address.

For large page table, the table itself may be paged and is addressed using virtual memory, so how can we convert virtual address to physical address when the corresponding entry in the page table is paged and stored some where else? Or, how can we address a paged page table?

Many thanks.

1

1 Answers

0
votes

That's a good question. It's almost a chicken and egg problem. What you are asking is system dependent.It is done one some systems.

I will give you one way. There are both system and user page tables. The system page tables refer to physical addresses. The user page tables are virtual addresses within the system space.

If you reference a system address, you use a page table with a physical address. If you reference a user address, you use a page table with a virtual address.