Important consideration is size of pages to use. OS often has choice in this matter---many MMUs allow various different page sizes.
Average amount of internal fragmentation per segment is p/2.
Average # pages per process segment is s/p. Each page requires 'e' bytes of page table, so each process segment requires page table size of es/p bytes.
Total overhead per segment, therefore, due to internal fragmentation and page table entries, is
se/p + p/2To minimise the overhead, differentiate with respect to page size, p, and equate to 0:
-se/p2 + ½ = 0So for example, if the average segment size were 256K, and the page table entry size were 8 bytes, the optimum page size, to minimise overhead due to page table entries and internal fragmentation, would be sqrt(2 × 256K × 8) = 2048 = 2K.
=> p = sqrt(2se)
Note that this calculation ignores the need to keep page sizes large in order to speed up paging operations; it only considers memory overheads.