Paged segmentation and segmented paging are two memory management techniques that combine the principles of segmentation and paging to overcome their individual drawbacks. While they both use a two-level address translation system, the key difference lies in the organization of the tables and how they handle fragmentation.
Major Limitation of Single Level Paging
In single-level paging, the page table can become very large if the logical address space is big.
Example: With a 32-bit address and 4 KB page size, there are 2202^{20}220 pages , page table size β 4 MB per process.
Since each process has its own page table, huge memory is wasted.
For a 64-bit address space, a single page table may not even fit in main memory.
Many entries are often unused/invalid, as processes donβt use the entire logical address space.
Segmented Paging is a hybrid memory allocation technique that uses the benefits of both segmentation and paging.
To understand segmented paging in detail, refer article: Segmented Paging
Paged Segmentation
In segmented paging, each process has a different number of segments, and the segment tables can grow very large. This variation may lead to external fragmentation because of uneven segment table sizes. To solve this, paged segmentation is used, where the segment table itself is divided into pages.
The logical address generated by the CPU is now divided into four parts:
Page number 1 (to locate the page of the segment table),
Segment number (to identify the segment),
Page number 2 (to find the page within that segment),
Offset (to locate the exact word/byte inside the page).
This approach allows the system to manage even large segment tables efficiently, ensuring better use of memory while still preserving the logical view of segmentation.