Variable (or Dynamic) Partitioning in Operating System (original) (raw)

Last Updated : 15 Jan, 2026

Variable (Dynamic) Partitioning is a contiguous memory allocation technique where memory partitions are created at run-time based on the size of the process requesting memory. Unlike fixed partitioning, partitions are not predefined during system configuration.

This method was introduced to overcome the limitations of fixed partitioning, especially internal fragmentation.

**How Variable Partitioning Works:

Dynamic Partitioning

Dynamic Partitioning

**Key Features of Variable Partitioning

Advantages

  1. **No Internal Fragmentation: Memory is allocated exactly as per the process size, so no space is wasted inside a partition.
  2. **Better Memory Utilization: Since internal wastage is eliminated, available RAM is used more efficiently.
  3. **No Fixed Partition Size Limitation: A process of any size can be loaded as long as sufficient contiguous memory is available.
  4. **Higher Degree of Multiprogramming: More processes can be accommodated in memory due to flexible partition sizes.

Disadvantages

  1. **External Fragmentation: Free memory gets divided into small non-contiguous blocks, making it difficult to allocate memory for large processes.
  2. **Complex Implementation: Memory allocation and deallocation are done at run-time, making management more complicated than fixed partitioning.
  3. **Compaction Overhead: To reduce external fragmentation, compaction is required, which consumes CPU time and system resources.
  4. **Slower Allocation Process: Searching for a suitable free block (first fit, best fit, worst fit) increases allocation time.

No Internal Fragmentation

No Internal Fragmentation

Now P5 of size 3 MB cannot be accommodated despite the required available space because in contiguous no spanning is allowed.

Key Points On Variable (Dynamic) Partitioning in Operating Systems