In this video, we explore the concept of segmentation in operating systems, a key technique used in memory management. Segmentation helps organize memory into different logical units, improving the efficiency and flexibility of an OS.

Key Topics Covered:

What is segmentation in operating systems?
How segmentation works in memory management
Segmentation vs. paging: Key differences
Benefits and challenges of segmentation
Real-world examples of segmentation in OS architecture
Whether you're a computer science student, IT professional, or tech enthusiast, this video breaks down complex concepts into easy-to-understand explanations.

Subscribe for more OS concepts, tutorials, and tech insights!

Don’t forget to like, comment, and share your questions or feedback!

---------------------------------------------
#Chapter5
#MemoryManagement
#Segmentation


Like Paging, Segmentation is another non-contiguous memory allocation technique.
In segmentation, process is not divided blindly into fixed size pages.
Rather, the process is divided into modules for better visualization.


Characteristics-


Segmentation is a variable size partitioning scheme.
In segmentation, secondary memory and main memory are divided into partitions of unequal size.
The size of partitions depend on the length of modules.
The partitions of secondary memory are called as segments.

#SegmentTable


Segment table is a table that stores the information about each segment of the process.
It has two columns.
First column stores the size or length of the segment.
Second column stores the base address or starting address of the segment in the main memory.
Segment table is stored as a separate segment in the main memory.
Segment table base register (STBR) stores the base address of the segment table.
Translating Logical Address into Physical Address-


CPU always generates a logical address.
A physical address is needed to access the main memory.


Following steps are followed to translate logical address into physical address-




Step-01:


CPU generates a logical address consisting of two parts-

Segment Number
Segment Offset
Segment Number specifies the specific segment of the process from which CPU wants to read the data.
Segment Offset specifies the specific word in the segment that CPU wants to read.


Step-02:


For the generated segment number, corresponding entry is located in the segment table.
Then, segment offset is compared with the limit (size) of the segment.


Now, two cases are possible-



Case-01: Segment Offset (greater than or equal) Limit


If segment offset is found to be greater than or equal to the limit, a trap is generated.


Case-02: Segment Offset (less than) Limit


If segment offset is found to be smaller than the limit, then request is treated as a valid request.
The segment offset must always lie in the range [0, limit-1],
Then, segment offset is added with the base address of the segment.
The result obtained after addition is the address of the memory location storing the required word.

#OperatingSystem #OS #asadnomanee #banglalecture #CSE
#Lecturelia #MBSTU #MBSTU_CSE
#lecturelia #banglatutorial #bangla