SEGMENTATION IN OPERATING SYSTEM

Segmentation is another memory management technique that gives the user's view of a process. The user's view is mapped into the Physical Memory.

In Segmentation, a process is divided into multiple segments. The size of each segment is not necessarily the same which is different from paging. In Paging, a process was divided into equal partitions called pages. The module contained in a segment decides the size of the segment.

Why Segmentation is Needed?

We used Paging as one of the memory management techniques. In Paging, the process was divided into equal-sized pages irrespective of the fact that what is inside the pages. It also divides some relative parts of a process into different pages which should be loaded on the same page. It decreases the efficiency of the system and doesn't give the user's view of a process.

In Segmentation, similar modules are loaded in the same segments. It gives the user's view of a process and also increases the efficiency of the system as compared to Paging.


 

 

Types of Segmentation:

There are two types of Segmentation. These are:

1.    Simple Segmentation - In Simple Segmentation, each process is divided into multiple segments and all of them are loaded into the memory at run time. They can be at non-contagious locations.

2.    Virtual Memory Segmentation - In Virtual Memory Segmentation, each process is divided into multiple segments and all of them do not reside at one point at a time.

Advantages of Segmentation

  • There is no Internal Fragmentation.
  • It gives the user's view of a process.
  • It helps in dividing a program into similar modules which are called segments.
  • Segment Table consumes less space than Page Table.

Disadvantages of Segmentation 

  • When Process is removed from the memory, it breaks memory into small pieces which leads to External Fragmentation.

Conclusion

Segmentation is a memory management technique that can be used to improve the performance of an operating system. By dividing physical memory into segments, the operating system can better manage its memory use, improving efficiency and performance. 

 

Comments