Signup/Sign In

Difference between Paging and Segmentation

In this tutorial we will be covering the difference between Paging and Segmentation these are two different Memory management techniques in Operating systems.

Paging in OS

Paging is basically a technique of memory management in the operating system. In this technique, the operating system retrieves the processes from the secondary memory into the main memory and this memory is in the form of pages. Paging is a logical concept.

With the help of this technique, the main memory is split into the small blocks of physical memory that are commonly known as frames. In paging size of frames is fixed. In order to prevent external fragmentation and for the maximum usage of the main memory, the frame size must be the same as the page size. This technique helps to access the data faster.

Segmentation in OS

Segmentation is another technique of memory management. This technique is similar to Paging except for the fact that in segmentation the segments of a process are of variable length but in Paging the pages are of fixed size.

The memory is split into variable-length parts in segmentation. Each part is commonly known as segments. Information related to each segment is stored in a table and this table is commonly known as the segment table. The segment table generally occupies less space as compared to the paging table.

Differences between Paging and Segmentation

Now, we will cover the differences between Paging and Segmentation in the table given below:

Paging Segmentation
Paging is a memory management technique where memory is partitioned into fixed-sized blocks that are commonly known as pages. Segmentation is also a memory management technique where memory is partitioned into variable-sized blocks that are commonly known as segments.
With the help of Paging, the logical address is divided into a page number and page offset. With the help of Segmentation, the logical address is divided into section number and section offset.
This technique may lead to Internal Fragmentation. Segmentation may lead to External Fragmentation.
In Paging, the page size is decided by the hardware. While in Segmentation, the size of the segment is decided by the user.
In order to maintain the page data, the page table is created in the Paging In order to maintain the segment data, the segment table is created in the Paging
The page table mainly contains the base address of each page. The segment table mainly contains the segment number and the offset.
This technique is faster than segmentation. On the other hand, segmentation is slower than paging.
In Paging, a list of free frames is maintained by the Operating system. In Segmentation, a list of holes is maintained by the Operating system.
In this technique, in order to calculate the absolute address page number and the offset both are required. In this technique, in order to calculate the absolute address segment number and the offset both are required.



About the author:
Aspiring Software developer working as a content writer. I like computer related subjects like Computer Networks, Operating system, CAO, Database, and I am also learning Python.