For the implementation of a paging scheme, suppose the average process size be x bytes, the page size be y bytes, and each page entry requires z bytes. The optimum page size that minimizes the total overhead due to the page table and the internal fragmentation loss is given by
Answer:
So, option (C) is the correct answer.
Please follow the previous chapter Calculation of Optimal Page Size before seeing the examples.
Example 1:
A computer has a 4MB process, using a single-level paging system, where the page table entry size is 8 bytes. Find optimal page sizes which reduce total overhead and internal fragmentation of main memory.
Solution:
We come to know from previous Calculation of Optimal Page Size that optimal page size where page size = p, process size = Virtual Address Space (VAS) = S, and page table entry = e
Now, here process size = 4MB = and Page Table Entry (PTE) size = 8 byte =
So, as per the formula optimal page size is:
So, the optimal page size is 8KB.
A single-level paging system supports 32 bit virtual address as well as 16 byte page table entry sizes. Find a suitable page size that minimizes the total overhead due to the page table and the internal fragmentation loss.
(A) 512 KB (B) 256 KB (C) 64 KB (D) 32 KB
Solution:
We come to know from previous Calculation of Optimum Page Size that optimal page size where page size = p, process size = Virtual Address Space (VAS) = S, and page table entry = e
Now, here Virtual Address (VA) = Logical Address (LA) = 32 bit. So, Virtual Address Space (VAS) = Logical Address Space (LAS) = and Page Table Entry (PTE) size = 16 byte =
So, as per the formula optimal page size is:
So, the optimal page size is 512KB, and option (A) is correct.