Disadvantages of Compaction
- System efficiency reduces and latency is increased.
- A huge amount of time is wasted in performing compaction.
- CPU sits idle for a long time.
- Not always easy to perform compaction.
- It may cause deadlocks since it disturbs the memory allocation process.
Compaction in Operating System
Compaction is a technique to collect all the free memory present in the form of fragments into one large chunk of free memory, which can be used to run other processes.
It does that by moving all the processes towards one end of the memory and all the available free space towards the other end of the memory so that it becomes contiguous.
It is not always easy to do compaction. Compaction can be done only when the relocation is dynamic and done at execution time. Compaction can not be done when relocation is static and is performed at load time or assembly time.
For students preparing for competitive exams like GATE, understanding memory management techniques such as compaction is crucial. Our GATE course offers detailed coverage of these concepts, including practical examples and scenarios, to help you grasp the intricacies of dynamic and static relocation and their implications for memory management.
Contact Us