PAGE concept’s influence for the system performance

PAGE is a fixed size unit in a memory. If the PAGE size is small, most of critical parts of a program cannot be loaded to the memory. It causes for many page faults and consumes lots of time for the process of swapping. If the PAGE size is large frequency of page faults become less but physical memory under utilization occurs. As an example assume that PAGE size is 16K and there is a program which consumes only 2K in memory. 14K of 16K is underutilized. Both high frequency of PAGE faults and memory space underutilization cause to reduce system performance. So, the PAGE size should be compromised to maintain the system performance. Segmentation is introduced as a logical solution to manage above situation and improve the system performance.

What are segments in segmentation

Segments are logical entities. In program point of view code, data and stack are logical entities. Also in the data structuring point of view array, table, tree etc. are logical entities. Those logical entities in memory are called segments.

Qualities of a segment
Each of those segments have their own qualities. segments are variable size. As the segments are going to be stored in memory maximum size of a segment should be the virtual memory size and minimum size of a segment should be the PAGE size.

Size variability of segments

Segments can grow

It is not possible to determine an actual size of a segment since they can grow in the execution time. They are appointed only a minimum and maximum size. An unique address space is given to each segmentation. If the a segment requires more physical space as it is growing, swapping should be happened. But it is rare to see because a size of a segment is optimal.

Segment replacement

Compaction of Segments

FIFO (First In First Out) ,LRU(Least reasently used), Best fit, First fit algorithms are used for making decisions when it happens to be swapped. When the number of small size of holes are increasing as a result of segment's swapping in and out, memory becomes fragmented. To de fragment the physical memory segments can move to each other and create huge but few holes. It is called the compaction.

How the virtual address to physical address translation happens in segmentation

Processor sends a virtual address and it is consist of two sets. First part is segmentation number and second part is an offset. Using the Segmentation number MMU identify the segment start address of the particular virtual address. Then by combining the start address and offset of the virtual address the particular linear address will be created. If the system is enabled for paging linear address will be translated to a page address. Finally physical address will be identified through the common page table. If the paging is not enabled particular physical address will be directly identified.
Reference from a video by Prof. S. Raman, Dept. of Computer Science & Engg. IIT, Madras, India

Sign up to vote on this title
UsefulNot useful