Difference between Demand Paging and Segmentation

Operating SystemInternetComputer Network

Memory management is one of essential functionalities, which allows the allocation of memory to the processes for execution and deallocates the memory when the process is no longer needed. For this there are basically two approaches — Demand Paging and Segmentation. Differences between both are defined below.

Following are the important differences between Demand Paging and Segmentation −

Sr. No.KeyDemand PagingSegmentation
1DefinitionPaging is a memory management technique in which process address space is broken into blocks of the same size called pages.On other hand segmentation is a memory management technique in which each job is divided into several segments of different sizes, one for each module that contains pieces that perform related functions.
2Block SizeAs mentioned above in Pagination process address space is broken into fixed sized blocks which are called as pages. So block size is fixed in case of Pagination.On other hand in Segmentation process address space is broken in varying sized blocks which are called as sections. So block size is not fixed in case of Segmentation.
3Block size dependencyIn Pagination the size of blocks is dependent on system memory and gets assigned accordingly.In Segmentation the size is not dependent on system memory and is all up to user's choice that of what size blocks are needed.
4PerformanceIn context of performance Pagination is faster as compared to Segmentation.Segmentation is slower in speed as compared to Pagination.
5Data LoadIn case of Pagination pages get loaded in main memory at runtime when user demands it.In case of Segmentation all the sections get loaded at the time of compilation.
6Data RecordIn case of Pagination Page map table in demand paging manages record of pages in memory.In case of Segmentation, Segment map table in segmentation demonstrates every segment address in the memory.
raja
Published on 09-Jun-2020 12:45:28
Advertisements