Javatpoint Logo
Javatpoint Logo

Difference Between Page Table and Inverted Page Table

Paging in DBMS:

Operating systems use the idea of Paging to manage storage, retrieving processes from storage devices and storing them as pages in main memory. To break each process into different pages is the fundamental idea underlying pagination. The primary memory will likewise be divided into frames.

Each page of the process is saved in the memory frames. We can save the page in numerous places across the RAM, but contiguous frames are always our first choice. The process's pages' frame number is kept in the Page Table. A page's table entry includes various page-related data.

Using specific registers, the Page Table can be implemented on hardware. But only a tiny Page Table can be used effectively with a register for a Page Table. The quick hardware cache TLB (Translation Look-aside Buffer).

Terminologies used in the concept of Paging in DBMS:

  • Page Number(p):

The number of Bits is required to represent the pages in the Page Number or the logical address space.

  • Page Offset(d):

The total number of bits needed or required to represent a specific word on a page, the size of the page's logical address space, the word's position on the page, or the Page Offset.

  • Frame Number(f):

There is a certain number of bits required to represent the frame of the physical address which is known as the Frame Number.

  • Frame Offset(d):

There are certain bits required to denote a word in the frame, which is also known as physical address space size called Frame Offset.

Page Table in DBMS:

The operating system is responsible for maintaining a Page Table for each process. We didn't need to record any process identifiers in the Page Table because each process has its own Page Table. A Page Table transforms a specified virtual or logical page number into a real physical frame or page address.

The connection between virtual addresses and physical addresses is stored in a Page Table, a crucial component of a virtual memory system. The crucial component of the virtual address conversion Page Table is needed to get the data in the system's memory.

Inverted Page Table in DBMS:

In an Inverted Page Table, there is a virtual page with respect to each frame that is present in physical memory. As with the normal Page Table, the actual address translation starts with a virtual page and ends with a physical memory frame, but this Page Table is in reverse form because we see from physical memory to virtual memory in the case of mapping.

All the processes have the same single-page table used by the operating system, which is called an Inverted Page Table. There is an equal number of entries of the Inverted Page Table and frame counts in the main memory. To get around the page table's drawbacks, utilize the Inverted Page Table.

There is always room set aside for the page, regardless of whether it is in the main memory or not. However, if the page is absent, this is just a loss of computer memory.

Difference between Page Table and Inverted Page Table:

The following are the main differences between a Page Table and an Inverted Page Table:

Page Table Inverted Page Table
The mapping of logical addresses and physical addresses is stored in page tables, which are a crucial component of virtual memory systems. For each physical memory frame that is occupied, there is a virtual page in an Inverted Page Table. It can be utilized to get around the page table's restrictions.
The logical address of a memory reference is in the format:
Logical Address would be: <virtual page number (p), offset (d)>
Logical addresses for memory references take the following form:
Logical Address would be:<pid (id), virtual page number (p)> = page-table[f]
If the page is absent, there is memory loss in the Page Table. By simply reversing the Page Table, we may reduce memory waste.
The operating system maintains a Page Table for each process. For each process, the operating system keeps an Inverted Page Table.
Virtual memory systems employ a variety of data structures, including Page Tables. A hash table data structure can be used to build Inverted Page Tables for quicker lookup.

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA