1
$\begingroup$

I know that for standard page tables each process would have its own page table and for inverted the OS would have it.

But other than this what are the main differences between a standard page table and an inverted one?

$\endgroup$

1 Answer 1

1
$\begingroup$

The purpose of this inverted page table is to reduce the amount of physical memory needed to track virtual-to-physical address translations. We accomplish this savings by creating a table that has one entry per page of physical memory, indexed by the pair <process-id, page-number>. Because they keep information about which virtual memory page is stored in each physical frame, inverted page tables reduce the amount of physical memory needed to store this information. inverted page table

Each inverted page-table entry is a pair <process-id, page-number> where the process-id assumes the role of the address-space identifier. When a memory reference occurs, part of the virtual address, consisting of <process-id, page-number>, is presented to the memory subsystem. The inverted page table is then searched for a match. If a match is found—say, at entry i— then the physical address <i, offset> is generated. If no match is found, then an illegal address access has been attempted.

Although this scheme decreases the amount of memory needed to store each page table, it increases the amount of time needed to search the table when a page reference occurs. (because we might search the whole table to find a match).

Also with inverted page tables, only one mapping of a virtual address to the shared physical address may occur a any given time. A reference by another process sharing the memory will result in a page fault and will replace the mapping with a different virtual address.


More information : Operating System Concepts, 10th Edition | Abraham Silberschatz, Greg Gagne, Peter B. Galvin

$\endgroup$
2
  • $\begingroup$ How many logical addresses/pages can usefully be mapped to a single physical address? Shared memory; pages initially zeroed&"copied" on write, … $\endgroup$
    – greybeard
    Commented Jun 23, 2022 at 12:34
  • $\begingroup$ @greybeard I don't know if I completely got your question or not but as I figured, using standard paging each process has its own page table, which allows multiple virtual memory addresses to be mapped to same physical address. This is not true in inverted page table; because there is only one virtual page entry for every physical page, one physical page cannot have two (or more) shared virtual addresses. $\endgroup$ Commented Jun 23, 2022 at 16:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.