Paging Vs Segmentation

The memory management in the operating system is an essential functionality, which allows the allocation of memory to the processes for execution and deallocates the memory when the process is no longer needed. If we talk about the basic differences between the paging and segmentation it is, a page is a fixed-sized block whereas, a segment is a variable-sized block.

Key Differences Between Paging and Segmentation

  1. The basic difference between paging and segmentation is that a page is always of fixed block size whereas, a segment is of variable size.
  2. Paging may lead to internal fragmentation as the page is of fixed block size, but it may happen that the process does not acquire the entire block size which will generate the internal fragment in memory. The segmentation may lead to external fragmentation as the memory is filled with the variable sized blocks.
  3. In paging the user only provides a single integer as the address which is divided by the hardware into a page number and Offset. On the other hands, in segmentation the user specifies the address in two quantities i.e. segment number and offset.
  4. The size of the page is decided or specified by the hardware. On the other hands, the size of the segment is specified by the user.
  5. In paging, the page table maps the logical address to the physical address, and it contains base address of each page stored in the frames of physical memory space. However, in segmentation, the segment table maps the logical address to the physical address, and it contains segment number and offset (segment limit).

Conclusion:

Paging and segmentation both are the memory management schemes. Paging allows the memory to be divided into fixed sized block whereas the segmentation, divides the memory space into segments of the variable block size. Where the paging leads to internal fragmentation the segmentation leads to external fragmentation.

Comments

Popular posts from this blog

Process Vs Thread

Reasoning Vs Inference

Frame vs Packet