Page Table Entries 

Page table has page table entries, and each page table entry contains a frame number and optional status like present/Absent bit, Protection, Reference, Caching, and Dirty bit.

 

Page table entries in os

1. Frame Number:

It gives the frame number of the main memory for the required page.

2. Present/absent bit:

The present or absent bit tells about the presence or absence of a particular page you are looking for in the main memory. If the required page is found, it is a case of Page Hit, denoted by 1. When a required page is not found, it results in a page fault, which is indicated by 0. Page fault is controlled by OS, using the virtual memory concept.

3. Protection bit:

The protection bit tells about the protection that you want to apply on that page. There are three permissions available on any page: read, write, and execute.

4. Referenced Bit

The referenced bit tells whether this page has been accessed in the last clock cycle or not. If it is accessed earlier, then the reference bit is set to 1. If this page referred first time then reference bit set to 0. It is used in memory access algorithms like LRU, etc.

5. Caching Enabled/Disabled

The cache is a memory that is faster and closer to the CPU. The least Recently used information is stored in the Cache. The cache can be enabled or disabled for pages.

Sometimes, we need the fresh data (Dynamic). If we use an account and our balance dynamically changes with time, then in such cases, keep the cache disabled.

Sometimes, we need the Static data as a video, which we use again and again. Then, for this type of task, a cache can be enabled.

6. Modified bit:

It is also called a dirty bit. It tells whether the page has been modified or not. If the value of modified bit is 1 then it means the value of this page is updated in RAM by CPU with the permission of Process Write. If dirty value=1, then OS will update the value of this page on the hard disk. If dirty value=0, then it means no change is performed in RAM by the CPU.