Which is better segmentation with paging or paging?

If I understand correctly, in segmentation the entire process is is divided into different segments like global, code and heap.

While it is true that internal fragmentation is there in both segmentation and paging, segmentation provides a mechanism to prevent page faults as compared to regular paging.

Think of it this way,

Simple paging: Processor just fetches the next pages in the control flow, but does not take into consideration whether those pages work with global data(whether the pages that have them should be loaded). Hence more page faults.

Segmentation with paging: All segments are paged separately and the next items required for each segment is paged. Hence comparatively less page faults.

This is comparable to the data and instruction cache requirements in processors. To answer your question segmentation with paging is better than simple paging, not in terms of internal fragmentation but for performance improvement.

Browse More Popular Posts

Leave a Comment