WWW Geeksforgeeks Org Difference Between Paging and Segmentation Amp

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

GEEKSFORGEEKS

Difference Between Paging and Segmentation


Paging:
Paging is a method or technique which is used for non-contiguous memory allocation. It is a fixed-size partitioning
theme (scheme). In paging, both main memory and secondary memory are divided into equal fixed-size partitions.
The partitions of the secondary memory area unit and main memory area unit are known as pages and frames
respectively.

Paging is a memory management method accustomed fetch processes from the secondary memory into the main
memory in the form of pages. in paging, each process is split into parts wherever the size of every part is the
same as the page size. The size of the last half could also be but the page size. The pages of the process area
unit hold on within the frames of main memory relying upon their accessibility.

Segmentation:
Segmentation is another non-contiguous memory allocation scheme like paging. like paging, in segmentation, the
process isn’t divided indiscriminately into mounted(fixed) size pages. It is a variable-size partitioning theme. like
paging, in segmentation, secondary and main memory are not divided into partitions of equal size. The partitions
of secondary memory area units are known as segments. The details concerning every segment are hold in a
table known as segmentation table. Segment table contains two main data concerning segment, one is Base,
which is the bottom address of the segment and another is Limit, which is the length of the segment.

In segmentation, the CPU generates a logical address that contains the Segment number and segment offset. If
the segment offset is a smaller amount than the limit then the address called valid address otherwise it throws
miscalculation because the address is invalid.

The above figure shows the translation of a logical address to a physical address.

S.NO Paging Segmentation

In paging, the program is divided into fixed or In segmentation, the program is divided into
1.
mounted size pages. variable size sections.
For the paging operating system is
2. For segmentation compiler is accountable.
accountable.

3. Page size is determined by hardware. Here, the section size is given by the user.

4. It is faster in comparison to segmentation. Segmentation is slow.

5. Paging could result in internal fragmentation. Segmentation could result in external fragmentation.

In paging, the logical address is split into a Here, the logical address is split into section number
6.
page number and page offset. and section offset.

While segmentation also comprises the segment


Paging comprises a page table that encloses
7. table which encloses segment number and segment
the base address of every page.
offset.

The page table is employed to keep up the


8. Section Table maintains the section data.
page data.

In paging, the operating system must maintain In segmentation, the operating system maintains a
9.
a free frame list. list of holes in the main memory.

10. Paging is invisible to the user. Segmentation is visible to the user.

In paging, the processor needs the page


In segmentation, the processor uses segment
11. number, and offset to calculate the absolute
number, and offset to calculate the full address.
address.

It is hard to allow sharing of procedures Facilitates sharing of procedures between the


12.
between processes. processes.

In paging, a programmer cannot efficiently


13 It can efficiently handle data structures.
handle data structure.

14. This protection is hard to apply. Easy to apply for protection in segmentation.

The size of the page needs always be equal


15. There is no constraint on the size of segments.
to the size of frames.

A page is referred to as a physical unit of A segment is referred to as a logical unit of


16.
information. information.

17. Paging results in a less efficient system. Segmentation results in a more efficient system.

Article Tags : Difference Between GATE CS Operating Systems

Read Full Article

Company Explore Languages DSA Data Science & Web


About Us Job-A-Thon Hiring Python Data Structures ML Technologies
A-143, 9th Floor, Sovereign Corporate Challenge Data Science With
Legal Java Algorithms HTML
Tower, Sector-136, Noida, Uttar
Hack-A-Thon Python
Pradesh - 201305 Careers CSS
C++ DSA for Beginners
GfG Weekly Data Science For
In Media PHP Basic DSA JavaScript
Contest Beginner
Contact Us Problems TypeScript
GoLang Machine Learning
Offline Classes
Advertise with us DSA Roadmap Tutorial ReactJS
(Delhi/NCR) SQL
GFG Corporate DSA Interview
DSA in JAVA/C++ R Language ML Maths NextJS
Solution Questions
Master System Android Tutorial Data Visualisation NodeJs
Placement Training Competitive
Design Tutorial
Bootstrap
Program Programming
Master CP Pandas Tutorial
Tailwind CSS
GeeksforGeeks NumPy Tutorial
Videos NLP Tutorial
Geeks Community Deep Learning
Tutorial
Python Tutorial Computer DevOps System Design School Commerce
Python Science Git High Level Design Subjects Accountancy
Programming GATE CS Notes Mathematics
AWS Low Level Design Business Studies
Examples
Operating Systems Docker UML Diagrams Physics Economics
Django Tutorial
Computer Network Kubernetes Interview Guide Chemistry Management
Python Projects
Database Azure Design Patterns Biology HR Management
Python Tkinter Management
GCP OOAD Social Science Finance
Web Scraping System
DevOps Roadmap System Design English Grammar Income Tax
OpenCV Tutorial Software
Bootcamp
Engineering
Python Interview
Interview Questions
Question Digital Logic Design

Engineering Maths

UPSC Study Preparation Competitive More Tutorials Free Online Write & Earn
Material Corner Exams Software Tools Write an Article

Polity Notes Company-Wise JEE Advanced Development Typing Test Improve an Article

Geography Notes Recruitment UGC NET Software Testing Image Editor Pick Topics to Write
Process
History Notes SSC CGL Product Code Formatters Share your
Resume Templates Management Experiences
Science and SBI PO Code Converters
Technology Notes Aptitude Project
SBI Clerk Currency Converter Internships
Preparation Management
Economy Notes
IBPS PO Random Number
Puzzles Linux
Ethics Notes Generator
IBPS Clerk
Company-Wise Excel
Previous Year Random Password
Preparation
Papers All Cheat Sheets Generator
Companies

Colleges

@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved Open In App

You might also like