Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  What is compaction refers toa)a technique for... Start Learning for Free
What is compaction refers to
  • a)
    a technique for overcoming internal fragmentation
  • b)
    a paging technique
  • c)
    a technique for overcoming external fragmentation
  • d)
    a technique for compressing the data
Correct answer is option 'C'. Can you explain this answer?
Most Upvoted Answer
What is compaction refers toa)a technique for overcoming internal frag...
Compaction refers to a technique for overcoming external fragmentation in computer memory management. It involves rearranging the memory blocks to reduce or eliminate the fragmentation and make efficient use of available memory.

External fragmentation occurs when free memory is scattered throughout the memory space in small, non-contiguous blocks. This can happen due to the allocation and deallocation of variable-sized memory blocks. As a result, even though there may be enough free memory to satisfy a memory allocation request, it may not be available in a contiguous block, leading to inefficient memory utilization.

Compaction is a process of rearranging memory blocks to create larger contiguous blocks of free memory. It involves moving allocated blocks and adjusting memory addresses to eliminate the gaps between them. The goal is to create a single large block of free memory, which can then be used to satisfy larger memory allocation requests.

Here is a detailed explanation of how compaction works:

1. Identify fragmented memory: The first step is to identify the areas of memory that are fragmented and contain small free blocks.

2. Relocate allocated blocks: The next step is to move the allocated blocks towards one end of the memory space, typically towards the lower addresses. This involves updating memory addresses in the process control blocks (PCBs) and any pointers or references to the memory blocks.

3. Adjust memory addresses: After relocating the allocated blocks, the memory addresses need to be adjusted to reflect the new positions. This may involve updating pointers, references, and any other data structures that store memory addresses.

4. Create a large block of free memory: As the allocated blocks are moved, the gaps between them are eliminated, creating a larger contiguous block of free memory.

5. Update memory management data structures: Finally, the memory management data structures, such as the free block list or bitmap, need to be updated to reflect the changes in the memory layout.

By compacting the memory and eliminating external fragmentation, compaction improves memory utilization and reduces the likelihood of memory allocation failures due to insufficient contiguous free memory. However, compaction can be a costly operation in terms of time and computational resources, especially if there are many allocated blocks that need to be moved. Therefore, it is typically used in situations where external fragmentation becomes a significant problem and memory compaction can be performed efficiently.
Free Test
Community Answer
What is compaction refers toa)a technique for overcoming internal frag...
  • In memory management, swapping creates multiple fragments in the memory because of the processes moving in and out.
  • Compaction refers to combining of all the empty spaces together and processes.
  • Compaction helps to solve the problem of fragmentation, but it requires a lot of CPU time.
  • It moves all the occupied areas of storage to one end and leaves one large free space for incoming jobs, instead of numerous small ones.
  • In compaction, the system also maintains relocation information and it must be performed on each new allocation of job to the memory or completion of job from memory.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

What is compaction refers toa)a technique for overcoming internal fragmentationb)a paging techniquec)a technique for overcoming external fragmentationd)a technique for compressing the dataCorrect answer is option 'C'. Can you explain this answer?
Question Description
What is compaction refers toa)a technique for overcoming internal fragmentationb)a paging techniquec)a technique for overcoming external fragmentationd)a technique for compressing the dataCorrect answer is option 'C'. Can you explain this answer? for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about What is compaction refers toa)a technique for overcoming internal fragmentationb)a paging techniquec)a technique for overcoming external fragmentationd)a technique for compressing the dataCorrect answer is option 'C'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for What is compaction refers toa)a technique for overcoming internal fragmentationb)a paging techniquec)a technique for overcoming external fragmentationd)a technique for compressing the dataCorrect answer is option 'C'. Can you explain this answer?.
Solutions for What is compaction refers toa)a technique for overcoming internal fragmentationb)a paging techniquec)a technique for overcoming external fragmentationd)a technique for compressing the dataCorrect answer is option 'C'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of What is compaction refers toa)a technique for overcoming internal fragmentationb)a paging techniquec)a technique for overcoming external fragmentationd)a technique for compressing the dataCorrect answer is option 'C'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of What is compaction refers toa)a technique for overcoming internal fragmentationb)a paging techniquec)a technique for overcoming external fragmentationd)a technique for compressing the dataCorrect answer is option 'C'. Can you explain this answer?, a detailed solution for What is compaction refers toa)a technique for overcoming internal fragmentationb)a paging techniquec)a technique for overcoming external fragmentationd)a technique for compressing the dataCorrect answer is option 'C'. Can you explain this answer? has been provided alongside types of What is compaction refers toa)a technique for overcoming internal fragmentationb)a paging techniquec)a technique for overcoming external fragmentationd)a technique for compressing the dataCorrect answer is option 'C'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice What is compaction refers toa)a technique for overcoming internal fragmentationb)a paging techniquec)a technique for overcoming external fragmentationd)a technique for compressing the dataCorrect answer is option 'C'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev