Discussion
Compaction is used to solve which problem?
Answer: A
Correct answer: External fragmentation
Compaction moves allocated blocks together at one end of memory so that all the free space forms a single large hole. It is the remedy for external fragmentation, where enough total memory is free but it is scattered in pieces too small to be useful. It has two serious costs. Copying every process is expensive, and the system can do nothing else meanwhile. And it is possible only if relocation is dynamic - addresses bound at execution time through a base register - since a process whose addresses were fixed at load time cannot be moved. It does nothing for internal fragmentation, which is space wasted inside an allocated block and cannot be recovered by rearrangement. The better answer to external fragmentation is paging, which removes the problem by definition: since any free frame will serve for any page, physical contiguity is never required and there is nothing to compact. Compaction survives in garbage-collected runtimes, where it consolidates the heap.
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development