Segmentation in Operating System

A process is divided into Segments. The chunks that a program is divided into which are not necessarily all of the same sizes are called segments. Segmentation gives user’s view of the process which paging does not give. Here the user’s view is mapped to physical memory.
There are types of segmentation:

  1. Virtual memory segmentation –
    Each process is divided into a number of segments, not all of which are resident at any one point in time.
  2. Simple segmentation –
    Each process is divided into a number of segments, all of which are loaded into memory at run time, though not necessarily contiguously.

There is no simple relationship between logical addresses and physical addresses in segmentation. A table stores the information about all such segments and is called Segment Table.

Segment Table – It maps two-dimensional Logical address into one-dimensional Physical address. It’s each table entry has:

Translation of Two dimensional Logical Address to one dimensional Physical Address.

Address generated by the CPU is divided into:

Advantages of Segmentation –

Disadvantage of Segmentation –

This article has been contributed by Vikash Kumar. Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above

Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.

Improved By : VaibhavRai3

Article Tags :
Practice Tags :