Partition Selection policy & Fragmentation

Partition Selection policy & Fragmentation

Partition Selection policy:

Partition Selection policy, When the multiple memory holes (partitions) are large enough to contain a process, the operating system must use an algorithm to select in which hole the process will be loaded. The partition selection algorithm is as follows:

  • First-fit The OS looks at all sections of free memory. The process is allocated to the first hole found that is big enough size than the size of the process.
  • Next Fit: The next fit search starts at the last hole allocated and The process is allocated to the next hole found that is big enough size than the size of the process.
  • Best-fit: The Best Fit searches the entire list of holes to find the smallest hole that is big enough size than the size of the process.
  • Worst-fit: The Worst Fit searches the entire list of holes to find the largest hole that is big enough size than the size of the process.

Fragmentation:

The wasting of memory space is called fragmentation. There are two types of fragmentation as follows:

  1. External Fragmentation:

    The total memory space exists to satisfy a request, but it is not contiguous. This wasted space not allocated to any partition is called external fragmentation. The external fragmentation can be reduced by compaction.

  2. Internal Fragmentation:

    The allocated memory may be slightly larger than requested to satisfy a request, but it is not contiguous. This wasted space not allocated to any partition is called external fragmentation. The external fragmentation can be reduced by compaction The wasted space within a partition is called internal fragmentation. One method to reduce internal fragmentation is to use partitions of different size.

basicittopic

basicittopic

A Computer Science Study for IT students and people of IT community