Open In App

Page Table Entries in Page Table

A Page Table is a data structure used by the operating system to keep track of the mapping between virtual addresses used by a process and the corresponding physical addresses in the system’s memory.

A Page Table Entry (PTE) is an entry in the Page Table that stores information about a particular page of memory. Each PTE contains information such as the physical address of the page in memory, whether the page is present in memory or not, whether it is writable or not, and other access permissions.



The size and format of a PTE can vary depending on the architecture of the system and the operating system used. In general, a PTE contains enough information to allow the operating system to manage memory efficiently and protect the system from malicious or accidental access to memory.

Page Table Entry

The number of Page Table Entries in a Page Table depends on the size of the virtual address space used by a process and the size of the memory pages used by the system. For example, if the virtual address space of a process is 32 bits, and the system uses 4 KB pages, then the Page Table will have 2^20 (1 million) entries, with each entry being 4 bytes in size.



In modern systems with large virtual address spaces, such as 64-bit systems, the Page Table can become very large, leading to performance issues. To address this, some systems use hierarchical page tables, where the Page Table is divided into smaller tables, each pointing to a larger table. This allows for more efficient memory management and faster access to Page Table Entries.

Information Stored in Page Table Entry

Number of bits for frame = Size of physical memory / Frame Size

Advantages of Using a Page Table in a Virtual Memory System

Questions For Practice

1. Consider a machine with 64 MB of physical memory and a 32-bit virtual address space. If the page size is 4KB, what is the approximate size of the page table? (GATE CS 2001)

(A) 16 MB

(B) 8MB

(C) 2MB

(D) 24 MB

Solution: Correct Answer is (C).

For a detailed solution, refer to GATE CS 2001, Question 46.

2. In a virtual memory system, the size of the virtual address is 32-bit, the size of the physical address is 30-bit, the page size is 4 Kbyte, and the size of each page table entry is 32-bit. The main memory is byte addressable. Which one of the following is the maximum number of bits that can be used for storing protection and other information in each page table entry? (GATE CS 2004)

(A) 2

(B) 10

(C) 12

(D) 14

Solution: Correct Answer is (D).

For a detailed Solution, refer to GATE CS 2004, Question 66.

3. Consider a system with byte-addressable memory, 32-bit logical addresses, 4-kilobyte page sizes, and page table entries of 4 bytes each. The size of the page table in the system in megabytes is ___________. (GATE CS 2015)

(A) 2

(B) 4

(C) 8

(D) 16

Solution: Correct Answer is (B).

For a detailed solution, refer to GATE CS 2015 (Set 1), Question 65

FAQs On Page Table

Q.1: What happens in case the Page Table Entry is not present in the Page Table?

Answer:

If a Page Table Entry is not present in the Page Table, it leads to a page fault, and the Operating System has to bring the required page from the disk into memory.

Q.2: Can we modify the page table entry during the runtime?

Answer:

Yes, we can easily modify the page table entries during runtime for changing the mapping functionality.

Q.3: Can you specify the purpose of the Page Table Directory?

Answer:

The purpose of the Page Global Directory is to locate the page middle directory in a multi-level paging system.


Article Tags :