An important operation of memory management is to bring programs into main memory for execution by the processor. Partitioning is a technique that divides a memory into multiple partitions. These partitions can be of different size or same size.
Types of partitioning
Fixed partitioning i.e. static partitioning
Variable partitioning i.e. dynamic partitioning
Fixed Partitioning: Main memory is divided into multiple partitions of fixed size at the time of system generation. A process may be loaded into a partition of equal size or greater size. Partitions can be of equal size or unequal size.
Equal size partitioning: Main memory is divided into equal size partitions. Any process with less or equal size can be loaded in any available partition.
OR
Unequal size partitioning: Main memory is divided into multiple partitions of unequal size. Each process can be loaded into the smallest partition within which the process will fit.
Variable partitioning: When a process enters in main memory, it is allocated exact size that is required by that process. So in this method, partitions can vary in size depending on memory space required by a process entering in main memory. Operating system maintains a table indicating which parts of memory are available and which are occupied. When new process arrives and it needs space, system searches for available memory space in main memory. If it is available, then memory is allocated to the process by creating a partition in memory. For example: Consider following table with process and memory space.