---
title: "What are Paging and Segmentation in the operating system?"  
description: "What are Paging and Segmentation in the operating system?"  
author: "Revati S Misra"  
published: 2023-03-26  
updated: 2023-04-03  
canonical: https://www.mindstick.com/forum/157586/what-are-paging-and-segmentation-in-the-operating-system  
category: "Operating System"  
tags: ["windows", "operating system"]  
reading_time: 2 minutes  

---

# What are Paging and Segmentation in the operating system?

What are [Paging](https://www.mindstick.com/articles/335974/retrieve-data-from-restful-api-and-add-paging-in-knockout-js) and [Segmentation in the operating](https://www.mindstick.com/forum/157678/write-in-brief-about-segmentation-in-the-operating-system) [system](https://www.mindstick.com/articles/23411/the-most-effective-method-to-find-the-perfect-small-business-phone-system-for-your-business)?

## Replies

### Reply by Krishnapriya Rajeev

[Paging and Segmentation](https://www.mindstick.com/forum/157677/what-is-paging-in-os-explain-the-difference-between-paging-and-segmentation) are two *memory management schemes* used by operating systems to manage the memory of a computer system.

**Paging**: Paging is a memory management technique in which the physical memory of a computer is divided into *fixed-size blocks called pages*. The *logical memory* of a program is also divided into fixed-size blocks called *frames*. The pages of a program are mapped onto the frames of physical memory, and the mapping is maintained in a page table.

When a program references a memory address, the page table is used to translate the logical address into a physical address. If the required page is not in physical memory, a page fault occurs, and the page must be fetched from secondary storage into physical memory. Paging helps to reduce *internal fragmentation* and allows processes to use *non-contiguous memory*.

Paging provides better memory utilization and protection between processes, but it requires more overhead for maintaining the page table.

**Segmentation**: Segmentation is a memory management technique in which the logical memory of a program is divided into *variable-size segments*. Each segment represents a logical unit of the program, such as a *code segment, a data segment,* and a *stack segment*. Segmentation helps to reduce external fragmentation and allows the logical structure of a program to be more easily managed.

Each segment is allocated a *contiguous block of physical memory*, and the mapping between logical and physical addresses is maintained in a *segment table*. When a program references a memory address, the segment table is used to translate the logical address into a physical address. The segment table holds two key pieces of information related to a segment. Firstly, it contains the *Base value* which refers to the lowest address of the segment, and secondly, it holds the *Limit value* which specifies the size of the segment.

Segmentation provides better program structure and flexibility, but it can be less efficient in terms of memory utilization.


---

Original Source: https://www.mindstick.com/forum/157586/what-are-paging-and-segmentation-in-the-operating-system

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
