C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
Size of the page tableHowever, the part of the process which is being executed by the CPU must be present in the main memory during that time period. The page table must also be present in the main memory all the time because it has the entry for all the pages. The size of the page table depends upon the number of entries in the table and the bytes stored in one entry. Let's consider, Logical Address = 24 bits Logical Address space = 2 ^ 24 bytes Let's say, Page size = 4 KB = 2 ^ 12 Bytes Page offset = 12 Number of bits in a page = Logical Address - Page Offset = 24 - 12 = 12 bits Number of pages = 2 ^ 12 = 2 X 2 X 10 ^ 10 = 4 KB Let's say, Page table entry = 1 Byte Therefore, the size of the page table = 4 KB X 1 Byte = 4 KB Here we are lucky enough to get the page table size equal to the frame size. Now, the page table will be simply stored in one of the frames of the main memory. The CPU maintains a register which contains the base address of that frame, every page number from the logical address will first be added to that base address so that we can access the actual location of the word being asked. However, in some cases, the page table size and the frame size might not be same. In those cases, the page table is considered as the collection of frames and will be stored in the different frames.
Next TopicFinding Optimal Page Size
|