Problem Statement
What is segmentation in memory management and how does it differ from paging?
Explanation
Segmentation divides a process’s memory into logical segments such as code, data, stack or other modules. Each segment may be of variable size and can grow or shrink independently. The key difference from paging is that segments are logical units meaningful to the program, while pages are fixed size and meaningless to the program’s logic. Segmentation can suffer from external fragmentation because segments are variable sized. On the other hand paging reduces external fragmentation but may suffer from internal fragmentation, and segments require more complex management. :contentReference[oaicite:3]{index=3}
