• Networking
  • Programming
  • DBMS
  • Operating System
  • Internet
  • Hardware
  • Software

Tech Differences

Know the Technical Differences

Difference Between Paging and Segmentation in OS

paging-vs-segmentationThe memory management in the operating system is an essential functionality, which allows the allocation of memory to the processes for execution and deallocates the memory when the process is no longer needed. In this article, we will discuss two memory management schemes paging and segmentation.

The basic difference between paging and segmentation is that, “page” is a fixed-sized block whereas, a “segment” is a variable-sized block. We will discuss some more differences between Paging and Segmentation with the help of comparison chart shown below.

Content: Paging Vs Segmentation

  1. Comparison Chart
  2. Definition
  3. Key Differences
  4. Conclusion

Comparison Chart

Basis for ComparisonPagingSegmentation
BasicA page is of fixed block size.A segment is of variable size.
FragmentationPaging may lead to internal fragmentation.Segmentation may lead to external fragmentation.
AddressThe user specified address is divided by CPU into a page number and offset. The user specifies each address by two quantities a segment number and the offset (Segment limit).
SizeThe hardware decides the page size.The segment size is specified by the user.
TablePaging involves a page table that contains base address of each page.Segmentation involves the segment table that contains segment number and offset (segment length).

Definition of Paging

Paging is a memory management scheme. Paging allows a process to be stored in a memory in a non-contiguous manner. Storing process in a non-contiguous manner solves the problem of external fragmentation.

For implementing paging the physical and logical memory spaces are divided into the same fixed-sized blocks. These fixed-sized blocks of physical memory are called frames, and the fixed-sized blocks of logical memory are called pages.

When a process needs to be executed the process pages from logical memory space are loaded into the frames of physical memory address space. Now the address generated by CPU for accessing the frame is divided into two parts i.e. page number and page offset.paging The page table uses page number as an index; each process has its separate page table that maps logical address to the physical address. The page table contains base address of the page stored in the frame of physical memory space. The base address defined by page table is combined with the page offset to define the frame number in physical memory where the page is stored.

Definition of Segmentation

Like Paging, Segmentation is also a memory management scheme. It supports the user’s view of the memory. The process is divided into the variable size segments and loaded to the logical memory address space.

The logical address space is the collection of variable size segments. Each segment has its name and length. For the execution, the segments from logical memory space are loaded to the physical memory space.segmentation The address specified by the user contain two quantities the segment name and the Offset. The segments are numbered and referred by the segment number instead of segment name. This segment number is used as an index in the segment table, and offset value decides the length or limit of the segment. The segment number and the offset together combinely generates the address of the segment in the physical memory space.

Key Differences Between Paging and Segmentation

  1. The basic difference between paging and segmentation is that a page is always of fixed block size whereas, a segment is of variable size.
  2. Paging may lead to internal fragmentation as the page is of fixed block size, but it may happen that the process does not acquire the entire block size which will generate the internal fragment in memory. The segmentation may lead to external fragmentation as the memory is filled with the variable sized blocks.
  3. In paging the user only provides a single integer as the address which is divided by the hardware into a page number and Offset. On the other hands, in segmentation the user specifies the address in two quantities i.e. segment number and offset.
  4. The size of the page is decided or specified by the hardware. On the other hands, the size of the segment is specified by the user.
  5. In paging, the page table maps the logical address to the physical address, and it contains base address of each page stored in the frames of physical memory space. However, in segmentation, the segment table maps the logical address to the physical address, and it contains segment number and offset (segment limit).

Conclusion

Paging and segmentation both are the memory management schemes. Paging allows the memory to be divided into fixed sized block whereas the segmentation, divides the memory space into segments of the variable block size. Where the paging leads to internal fragmentation the segmentation leads to external fragmentation.

Related Differences:

  1. Difference Between Internal and External fragmentation
  2. Difference Between Fact Table and Dimension Table
  3. Difference Between Contiguous and Noncontiguous Memory Allocation
  4. Difference Between Left, Right and Full Outer Join
  5. Difference Between Paging and Swapping in OS

Comments

  1. micky says

    September 28, 2017 at 4:16 am

    THANKS

    Reply
  2. Mohan says

    December 31, 2017 at 3:00 am

    This was really helpful ..u Hav given a clear cut info necessary thank u

    Reply
  3. Gurpreet says

    April 10, 2018 at 7:31 am

    Very helpful, thanks a lot

    Reply
  4. Daddu says

    May 26, 2018 at 2:13 am

    Great

    Reply
  5. Arpan Hazra says

    August 1, 2018 at 12:28 pm

    This is very good and insightful. Thank you

    Reply
  6. Pritesh Rajak says

    October 5, 2018 at 8:46 am

    Thank you so much for the help

    Reply
  7. nadji says

    November 6, 2018 at 2:37 pm

    great job

    Reply
  8. Jason says

    December 13, 2018 at 11:44 pm

    great work thank you

    Reply
  9. Saurabh says

    January 2, 2019 at 2:38 pm

    Worked for me

    Reply
  10. Jhoon jheff says

    January 10, 2019 at 11:19 am

    I LIKE IT, HELPFUL
    THANK YOU

    Reply
  11. james clancy says

    January 17, 2019 at 2:04 pm

    good explanation

    Reply
  12. aleksandar zivkovic says

    February 16, 2019 at 8:23 pm

    good explanation. yet it would be interesting to hear how these two combine on modern architecture. Which one does Windows or Unix-based system use? what about Kernels?

    Reply
    • Neelima P says

      February 18, 2019 at 6:52 am

      The required information will be updated soon. Keep visiting….. 🙂

      Reply
  13. Satyam Devu says

    April 17, 2019 at 10:53 am

    Thank you so much, this is very helpful for me.

    Reply
  14. snOw mOtion says

    May 29, 2019 at 1:27 am

    Very nicely explained. Thank you!

    Reply
  15. Mr. Muhammad Adeel Abid says

    June 26, 2019 at 3:04 am

    Well illustrated. Good
    Helps me in identifying the core difference.

    Reply
  16. sagar says

    November 7, 2019 at 7:29 am

    amazing content……

    Reply
  17. Susmita Shaw says

    September 15, 2020 at 7:18 am

    That is very helpful for my study…
    Thank you..so much

    Reply
  18. Mercy says

    May 10, 2022 at 9:06 am

    Thanks

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Top 10 Differences

  • Difference Between OLTP and OLAP
  • Difference Between while and do-while Loop
  • Difference Between Guided and Unguided Media
  • Difference Between Preemptive and Non-Preemptive Scheduling in OS
  • Difference Between LAN, MAN and WAN
  • Difference Between if-else and switch
  • Difference Between dispose() and finalize() in C#
  • Difference Between for and while loop
  • Difference Between View and Materialized View
  • Difference Between Server-side Scripting and Client-side Scripting

Recent Addition

  • Difference Between Java and Python
  • Difference Between PHP and HTML
  • Difference Between GPS and GNSS 
  • Difference Between Virtualization and Containerization
  • Difference Between Storage and Memory

Categories

  • Artificial Intelligence
  • DBMS
  • Hardware
  • Internet
  • Networking
  • Operating System
  • Programming
  • Software

Copyright © 2025 · Tech Differences · Contact Us · About Us · Privacy