• Skip to main content
  • Skip to primary sidebar
  • Skip to secondary sidebar
  • Skip to footer

Computer Notes

Library
    • Computer Fundamental
    • Computer Memory
    • DBMS Tutorial
    • Operating System
    • Computer Networking
    • C Programming
    • C++ Programming
    • Java Programming
    • C# Programming
    • SQL Tutorial
    • Management Tutorial
    • Computer Graphics
    • Compiler Design
    • Style Sheet
    • JavaScript Tutorial
    • Html Tutorial
    • Wordpress Tutorial
    • Python Tutorial
    • PHP Tutorial
    • JSP Tutorial
    • AngularJS Tutorial
    • Data Structures
    • E Commerce Tutorial
    • Visual Basic
    • Structs2 Tutorial
    • Digital Electronics
    • Internet Terms
    • Servlet Tutorial
    • Software Engineering
    • Interviews Questions
    • Basic Terms
    • Troubleshooting
Menu

Header Right

Home » Fundamental » OS » What is Memory Segmentation?
Next →
← Prev

What is Memory Segmentation?

By Dinesh Thakur

Definition: Memory segmentation is the process in which we divide the primary memory of the computer into segments. It is a memory management technique. Each segment can be allocated to a process.
The segment table is the table which stores all the details about the segments which are further stored in one of the segments. Segment table contains two information about the segment: one is, the base address of the segment and other is, the length of the segment.

We’ll be covering the following topics in this tutorial:

  • Need of Segmentation
  • Difference Between Paging and Segmentation
  • Translation of logical address into physical address by the segmentation
  • Advantages of Memory Segmentation
  • Disadvantages of Memory Segmentation

Need of Segmentation

Before segmentation, we use paging as our memory management technique as paging is more close to the operating system instead of the user. Paging decreases the efficiency of the system as it can divide the same function into different pages which may or may not be loaded into the memory at the same time. On the other hand, segmentation divides the process into segments, and each segment can contain the same type of functions.

Difference Between Paging and Segmentation

PagingSegmentation
Paging is closer to our operating system.Segmentation is closer to the user rather than the operating system.
There is no need of doing any external fragmentation.There is external fragmentation in segmentation.
In this, the page information is stored in the page table.In this, the information about segments is stored in the segment table.
In this, our operating system is responsible.In this, the compiler is responsible for the working.
Paging suffers from internal fragmentation instead of external fragmentation.Segmentation suffers from external fragmentation rather than internal fragmentation.
Paging divides our program into various fixed size pages. Segmentation divides our program into various variable size segments.
In this, the logical address is divided into two things; page number and page offset.In this, the logical address is divided into two things: segment number and segment offset.
Paging is faster than segmentation.Segmentation is slower than paging.
It is a non-contiguous memory allocation.It is a non-contiguous memory allocation.
The entry of the page table contains flag bits and frame number so that it can represent the details about the pages.On the other hand, the entry of segment table contains base address and some protection bits of the segments.

Translation of logical address into physical address by the segmentation

A logical address is generated by the CPU which consists of two things:

1.   Segment number

2.   Offset

The segment number which logical address contains is mapped into the segment table. Now we compare the limit of the segment with the offset. If the respective limit is more than the offset, then there will be valid address otherwise the address will be invalid. When the address in invalid, then it will show an error. Through this, we get the physical address of the real word which is stored in the main memory.

All of this is wholly explained through the diagram given below. You can refer to this figure as well.

Memory segmentation in Operating System

Advantages of Memory Segmentation

• There is less overhead in segmentation.
• There is no internal fragmentation as external fragmentation is done in this.
• The size of the segment table is less whereas the size of the page table is big in paging.
• The average size of the segment is more as compared to the actual size of the page.
• We can easily relocate the segments as compared to the address space.

Disadvantages of Memory Segmentation

• It is a costly technique as compared to the other one.
• External fragmentation is there in it.
• Since there is a variably sized partition. So, it is difficult to allocate memory to them.

You’ll also like:

  1. Explain Memory Partitioning, Paging, Segmentation.
  2. How To Troubleshoot Memory (Random Access Memory)
  3. What is Cache Memory | Types of Cache Memory
  4. What is Memory management
  5. What is virtual memory? – Definition
Next →
← Prev
Like/Subscribe us for latest updates     

About Dinesh Thakur
Dinesh ThakurDinesh Thakur holds an B.C.A, MCDBA, MCSD certifications. Dinesh authors the hugely popular Computer Notes blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps.

Dinesh Thakur is a Freelance Writer who helps different clients from all over the globe. Dinesh has written over 500+ blogs, 30+ eBooks, and 10000+ Posts for all types of clients.


For any type of query or something that you think is missing, please feel free to Contact us.


Primary Sidebar

Operating System

Operating System & Types

    • Operating System - Software
    • Operating System - Definition
    • Operating System - Types
    • Operating System - Functions
    • Operating System - Characteristics
    • Operating System - Services
    • Operating System - Multiprogramming
    • Operating System - Time Sharing
    • Operating System - Multiprocessor
    • Operating System - Distributed
    • Operating System - Batch Processing
    • Operating System - Real-Time
    • Operating System - Multitasking
    • Operating System - Network(NOS)
    • Operating System - Multi-User
    • Operating System - Batch
    • Operating System - External Structure
    • Operating System - MS-DOS
    • Operating System - System Software
    • Operating System - Kernel
    • Operating System - Main Functions

Operating System Scheduling

    • Operating System - Scheduling
    • Operating System - Disk Scheduling
    • Operating System - Process
    • Operating System - Round Robin
    • Operating System - CPU Scheduling
    • Operating System - (FCFS) Scheduling
    • Operating System - Preemptive
    • Operating System - Priority Scheduling

Memory

    • Operating System - Memory
    • Operating System - Cache Memory
    • Operating System - Virtual Memory
    • Operating System - Memory Partition

Operating System - What is

    • Operating System - Booting
    • Operating System - Files & Types
    • Operating System - Shell
    • Operating System - Real Time System
    • Operating System - Demand Paging
    • Operating System - Multi Tasking
    • Operating System - Parallel Processing
    • Operating System - Swapping
    • Operating System - Spooling
    • Operating System - App Software
    • Operating System - Dead Lock
    • Operating System - Batch Processing
    • Operating System - Semaphore
    • Operating System - Variable Partitioned
    • Operating System - File System
    • Operating System - Cipher Text
    • Operating System - OS/2
    • Operating System - CONFIG.SYS
    • Operating System - Segmentation
    • Operating System - CLI

Some Other Tutorials

  • OS - Application Vs System Software
  • OS - Commands in DOS
  • OS - Process States
  • OS - System Components
  • OS - Inter-Process
  • OS - Computer Languages
  • OS - System Architecture
  • OS - Directory Structure
  • OS - Process Management
  • OS - Deadlock Prevention
  • OS - Thread Vs Process
  • OS - File Sharing

Other Links

  • Operating System - PDF Version

Footer

Basic Course

  • Computer Fundamental
  • Computer Networking
  • Operating System
  • Database System
  • Computer Graphics
  • Management System
  • Software Engineering
  • Digital Electronics
  • Electronic Commerce
  • Compiler Design
  • Troubleshooting

Programming

  • Java Programming
  • Structured Query (SQL)
  • C Programming
  • C++ Programming
  • Visual Basic
  • Data Structures
  • Struts 2
  • Java Servlet
  • C# Programming
  • Basic Terms
  • Interviews

World Wide Web

  • Internet
  • Java Script
  • HTML Language
  • Cascading Style Sheet
  • Java Server Pages
  • Wordpress
  • PHP
  • Python Tutorial
  • AngularJS
  • Troubleshooting

 About Us |  Contact Us |  FAQ

Dinesh Thakur is a Technology Columinist and founder of Computer Notes.

Copyright © 2025. All Rights Reserved.

APPLY FOR ONLINE JOB IN BIGGEST CRYPTO COMPANIES
APPLY NOW