What is the difference between paging and segmentation in memory management?

What is the difference between paging and segmentation in memory management?

a) Paging divides memory into fixed-size pages, while segmentation divides memory into variable-size segments
b) Segmentation divides memory into fixed-size blocks, while paging allocates entire programs
c) Paging manages memory for file systems, while segmentation handles CPU processes
d) Segmentation is only used in virtual memory systems

Answer:

a) Paging divides memory into fixed-size pages, while segmentation divides memory into variable-size segments

Explanation:

Paging and segmentation are both memory management techniques used in operating systems, but they handle memory differently. Paging divides memory into fixed-size pages, while segmentation divides memory into variable-size segments based on logical divisions of programs, such as functions or data structures.

In paging, physical memory is divided into equal-sized blocks (pages), which simplifies memory management and eliminates fragmentation. Segmentation, on the other hand, provides a more flexible memory management scheme by dividing memory according to logical program structures.

While paging is commonly used for implementing virtual memory, segmentation allows for a more human-readable organization of memory but can be more complex to manage due to variable segment sizes.

Reference:

Operating System MCQ (Multiple Choice Questions)

Scroll to Top