When the processor executes a process, it automatically converts from logical to physical address by adding the current starting location of the process, called it's base address to each logical address.
Every time the process is swapped in to main memory, the base address may be diffrent depending on the allocation of memory to the process.
Consider a main memory of 2-MB out of which 512-KB is used by the Operating System. Consider three process of size 425-KB, 368-KB and 470-KB and these three process are loaded into the memory. This leaves a hole at the end of the memory. That is too small for a fourth process. At some point none of the process in main memory is ready. The operating system swaps out process-2 which leaves sufficient room for new process of size 320-KB. Since process-4 is smaller then process-2, another hole is created. Later a point is reached at which none of the processes in the main memory is ready, but proces-2, so process-1 is swapped out and process-2 is swapped in there. It will create another hole. In this way it will create lot of small holes in the momory system which will lead to more memory wastage.
The
effect of dynamic partitionining that careates more whole during the execution of processes is shown in the Figure 3.21.