top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

What is compaction in context of operating system?

+1 vote
1,047 views
What is compaction in context of operating system?
posted May 31, 2014 by Amit Kumar Pandey

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

0 votes

Campaction in OS means moving the "in-use" memory areas to eliminate holes. Suppose we have five processes A1, A2, A3, A4, A5 allocated as |A1A2|A3|A4|A5| in memory. After sometime process A2 and A4 are terminated. Now we have memory layout as |A| - |A3| - |A5|. After applying compaction we will have |A1|A3|A5| - | - | i.e instead of two one-block memory unit we have one two-block memory unit.

answer May 31, 2014 by Salil Agrawal
0 votes

Compaction is used while doing memory management. Physical memory can be managed or used by various ways like paging, multi-partition etc. Some problem is associated with every technique.

when OS uses multi-partition of physical memory, it divides into physical memory in multiple chunks and a process can reside in one of them if it is not occupied by some other process. since each process has its own time to finish, it may happen is the system a new process needs memory which is available wrt to whole memory point of view but not contiguous. In such scenarios, OS does compaction of already running process and make memory available for already waiting process.

answer Jun 2, 2014 by Vimal Kumar Mishra
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...