pagingvssegmentation-featureimg

Similarities And Differences between Paging and Segmentation.

Hello Friends, In this blog post I am going to explain to you an interesting and importing topic which is to find out the similarities and differences between paging and segmentation. As we know these both are the schemes for managing the memory with reference to the operating system. Now we will see how these schemes help in managing the memory.

Similarities between paging and segmentation:

Both paging and segmentation are the schemes for memory management.

In a paging scheme, the operating system must maintain a page table for each process showing which frame each page occupies. Similarly in the segmentation operating system must maintain a segment table for each process showing the base address and length of each segment.

In a paging scheme, the operating system must must maintain a free frame list. Similarly, in segmentation, the operating system must maintain a list of free holes in the main memory.

In a paging scheme, the processor uses page number and offset to calculate the absolute address. Similarly in segmentation processor uses segment number and offset to calculate absolute address.

In a paging scheme, all the pages of a process must be in main memory to run, unless overlays are used. Similarly in segmentation, all the segments of a process must be in the main memory for the process to run unless overlays are used.

Differences between paging and segmentation:

In a paging scheme, the main memory is partitioned into small fixed-sized chunks called frames. Whereas in segmentation main memory is not partitioned.

In a paging scheme, the program broken into pages by the compiler or memory management system. Whereas in segmentation program segments specified by the programmer to the compiler.

Paging suffers from internal fragmentation within frames. Whereas no internal fragmentation happens in segmentation.

NO external fragmentation occurs in paging. Whereas segmentation suffers from external fragmentation.

In the case of any queries, you can write to us at a5theorys@gmail.com we will get back to you ASAP.

Hope! you would have enjoyed this post about similarities and differences between paging and segmentation.

Please feel free to give your important feedbacks in the comment section below.

Have a great time! Sayonara!