What is segmentation? How it differs from paging?
What is segmentation? How it differs from paging?
Both of these are techniques of memory management with major variations in their elements. In this article, we will discuss the difference between Paging and Segmentation. But let us first know more about them individually. Read ahead to know more.
What is Paging?
It is a technique of memory management that breaks the process address space into various blocks of similar sizes, known as pages. Here, we measure the size of a process in the total number of pages. In a similar manner, the main memory gets divided into various frames. The frames are small physical memory blocks of fixed size. We keep the overall size of a given frame to a page so that we can utilize the main memory in the most optimum manner. It also avoids external fragmentation.
What is Segmentation?
It is a technique of memory management in which every job gets divided into various blocks of varied sizes, known as segments. This way, we get one segment for every module with pieces performing related functions. These segments act as different spaces of the logical address of any program.
While executing a process, the corresponding segmentations load into a non-contagious form of memory. It happens even if every segmentation loads into the available memoryโs contagious block. Management of segmentation memory works similar to that of paging. The only difference is that the length of segments is varied, and the pages have a fixed size.
The segment of a program has the programโs data structures, functions, utility, main function, and more. The OS (operating system) primarily maintains segment tables for individual processes along with a list of all memory blocks that are free. It also includes the segment numbers and size, along with their locations in the main memory.
For individual segments, the table mainly stores the segmentโs starting address along with its length. The memory locationโs reference includes the values identifying the segment along with their offset.
Here is the difference between Paging and Segmentation in a tabular form:
Parameters |
Paging |
Segmentation |
Individual Memory |
In Paging, we break a process address space into blocks known as pages. |
In the case of Segmentation, we break a process address space into blocks known as sections. |
Memory Size |
The pages are blocks of fixed size. |
The sections are blocks of varying sizes. |
Accountability |
The OS divides the available memory into individual pages. |
The compiler mainly calculates the size of individual segments, their actual address as well as virtual address. |
Speed |
This technique is comparatively much faster in accessing memory. |
This technique is comparatively much slower in accessing memory than Paging. |
Size |
The available memory determines the individual page sizes. |
The user determines the individual segment sizes. |
Fragmentation |
The Paging technique may underutilize some of the pages- thus leading to internal fragmentation. |
The Segmentation technique may not use some of the memory blocks at all. Thus, it may lead to external fragmentation. |
Logical Address |
A logical address divides into page offset and page number in the case of Paging. |
A logical address divides into section offset and section number in the case of Segmentation. |
Data Storage |
In the case of Paging, the page table leads to the storage of the page data. |
In the case of Segmentation, the segmentation table leads to the storage of the segmentation data. |
Topics Covered :
- what is operating system and its types
- operating system in computer
- operating system responsibilities
- operating system definition
- operating system kya hai
- operating system in hindi
- operating system pdf
- operating system ppt
- operating system full course
- types of operating system
- functions of operating system
- operating system in detail
- what is operating system full information
- use of operating system
- operating system
- why operating system
- what is operating system
- segmentation with paging
- what is segmentation in operating system
- what is segmentation in os
- segmentation hardware in operating system
- segmentation in os tutorial
- segmentation with paging in operating system
- segmentation in operating system
- difference segmentation and paging
- segmentation and paging in operating system
- segmentation in operating system in english
- compare paging and segmentation
- segmentation
- distinguish between paging and segmentation
Thanks for reading this blog. Hope you get satisfied with the blog and definitely this blog must have valued your time and effort of reading.
Take a time to connect our other digital creations such as Instagram , Facebook and Youtube.
ย Social Mediaย Linksย ofย Tech DCodeย :
ย YouTube :ย https://www.youtube.com/channel/UCjJnEdeugftBwQ3yMuD4B_A
ย Instagram :ย https://www.instagram.com/thetechdcode/
ย Facebook Page :ย https://www.facebook.com/thetechdcode
ย Twitter :ย https://twitter.com/thetechdcode
ย Telegram Channel :ย https://t.me/thetechdcode
ย Tech DCode Linktree :ย https://linktr.ee/thetechdcode
ย My Personal Handles :ย https://linktr.ee/virtualshivamin
ย Social Media Linksย ofย SHIVAM SINGHย (OWNER) :
ย Instagram :ย https://www.instagram.com/virtualshivamin/
ย Facebook Page :ย https://www.facebook.com/virtualshivamin/
ย Twitter :ย https://twitter.com/virtualshivamin/
ย Personal Linktree :ย https://linktr.ee/virtualshivaminย