Difference between Paging and Segmentation

Main differences between Paging and Segmentation

  • Paging uses fixed-size blocks called pages, while Segmentation uses variable-sized blocks called segments.
  • Paging divides physical memory into fixed-size blocks (frames), while Segmentation does not divide physical memory.
  • Address translation in Paging is done using page number and page offset, while in Segmentation it is done using segment number and segment offset.
  • Memory access is generally faster in Paging, while Segmentation may result in slower memory access.
  • Paging may result in internal fragmentation, while Segmentation may result in external fragmentation.
  • Handling of data structures may be less efficient in Paging compared to Segmentation.
  • Paging is not visible to the user, while Segmentation is visible to the user.
  • Sharing of procedures between processes may be difficult in Paging, but is facilitated in Segmentation.
  • Paging requires a free frame list, while Segmentation requires a list of holes in main memory.

Comparison of Paging and Segmentation

Sr. No.PagingSegmentation
1The address space of a process is broken into blocks of fixed size called pages.The address space of a process is broken into blocks of different sizes.
2The memory is divided into pages by the Operating System.The segment size, virtual address, and actual address are calculated by the compiler.
3Page size depends on the memory available.Segment size is determined by the programmer.
4Memory access is faster in Paging.Memory access is slower in Segmentation.
5Internal fragmentation can be caused by Paging because some pages may be underutilized.External fragmentation can be caused by Segmentation because some memory blocks may not be used.
6The logical address gets split into page offset and page number.The logical address gets split into section offset and section number.
7Page data is stored in the page table.Segmentation data is stored in the segmentation table.
8Data structures cannot be handled efficiently.Data structures are handled efficiently.
9Paging is not visible to the user.Segmentation is visible to the user.
10The OS should maintain a free frame list.The OS should maintain a list of holes in the main memory.
11To calculate the absolute address, the processor needs a page number and offset.To calculate the full address, the processor needs segment number and offset.
12Sharing of procedures between processes is difficult in Paging.Segmentation facilitates sharing of procedures between the processes.

Leave a Reply

Your email address will not be published. Required fields are marked *