---
title: "What is paging in OS? Explain the difference between paging and segmentation."  
description: "What is paging in OS? Explain the difference between paging and segmentation."  
author: "Revati S Misra"  
published: 2023-04-02  
updated: 2023-04-05  
canonical: https://www.mindstick.com/forum/157677/what-is-paging-in-os-explain-the-difference-between-paging-and-segmentation  
category: "Operating System"  
tags: ["operating system"]  
reading_time: 2 minutes  

---

# What is paging in OS? Explain the difference between paging and segmentation.

What is [paging](https://www.mindstick.com/articles/335974/retrieve-data-from-restful-api-and-add-paging-in-knockout-js) in OS? [Explain the difference](https://www.mindstick.com/forum/156125/can-you-explain-the-difference-between-organic-and-paid-results) between paging and segmentation.

## Replies

### Reply by Krishnapriya Rajeev

**Paging** is the process of *transferring processes* from secondary storage into the main memory in the form of pages. It is a strategy for memory management that eliminates the need for physical memory to be allocated in a contiguous manner.

The main memory is *split into frames,* and each procedure is *split into multiple pages.*

A few important points in regard to paging are:

1. It maps the logical addresses to physical addresses.
2. The number of entries in the page table and a number of pages in the logical address space are the same.
3. The page size is equal to the frame size.
4. The page table entries contain the frame number.
5. All page tables are placed in the main memory

Segmentation, like paging, is also a strategy for the non-contiguous allocation of memory. However, in segmentation, the processes in the secondary memory are divided into *variable sizes* (unlike fixed sizes in pagisThe segmenting). These partitions in the secondary memory are called *segments.*

The key differences between paging and segmentation are given below:

| **Paging** | **Segmentation** |
| --- | --- |
| It is a physical unit of information. | It is a logical unit of information. |
| The program is divided into pages of fixed size. | The program is divided into segments of variable size. |
| Paging is handled by the operating system. | Segmentation is handled by the compiler. |
| The size of the pages are determined by the hardware. | The sizes of the segments are defined by the user. |
| Paging is faster than segmentation. | Segmentation tends to be slower than paging. |
| It can cause internal fragmentation. | It can lead to external fragmentation. |
| Page table comprises the base address of every page. | Segment table comprises The pagethe segment numbers and segment offset. |
| The process of paging is invisible to the user. | The process of segmentation is visible to the user. |
| It cannot handle data structures efficiently. | It is capable of handling data structures efficiently. |


---

Original Source: https://www.mindstick.com/forum/157677/what-is-paging-in-os-explain-the-difference-between-paging-and-segmentation

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
