Contiguous allocation questions are often lost by moving the pointer incorrectly, choosing a hole before checking the policy, or confusing unused space inside a partition with free holes between partitions. Contiguous Allocation questions commonly test First Fit, Best Fit and Worst Fit, allocation traces, fragmentation and compaction. The practice bank includes over 50 questions on Contiguous Allocation, so these patterns recur. Before each explanation, choose an option and write the hole list after every request on paper first. Rebuild the wider foundation through CS Fundamentals if needed.
Contiguous allocation rules to write before solving
Remember, First Fit scans from the start and takes the first sufficient hole. Next Fit resumes from the last placement point. Best Fit takes the smallest sufficient hole. Worst Fit takes the largest sufficient hole. In variable partitioning, a leftover remains a hole. In fixed partitioning, unused space inside an assigned partition is internal fragmentation.
Use two checks throughout. Internal fragmentation equals partition size - process size inside an allocated block. External fragmentation means total free space may be sufficient, but no single hole is large enough.
Contiguous allocation MCQs 1-3: fit rules and fixed partitions
Question 1 (UGC NET 2004)
In which of the following storage replacement strategies, a program is placed in the largest available hole in the memory
A. Best fit
B. First fit
C. Worst fit
D. Buddy
Answer: C. Worst fit. Worst Fit selects the largest hole. Best Fit takes the smallest sufficient hole, First Fit the first sufficient hole, and Buddy uses splitting and merging.
Question 2 (BELPRO 2025)
If a process needs 18 KB and the available memory blocks are 10 KB, 20 KB, 25 KB, and 30 KB, which block will Best Fit select?
A. 14 KB
B. 25 KB
C. 10 KB
D. 20 KB
Answer: D. 20 KB. The sufficient blocks are 20, 25 and 30 KB. Their minimum is 20 KB, leaving 20 - 18 = 2 KB. The 10 KB and 14 KB choices are too small, and 14 KB is not supplied.
Question 3 (UGC NET 2012)
Given memory partitions of 100 K, 500 K, 200 K, 300 K and 600 K (in order) and processes of 212 K, 417 K, 112 K, and 426 K (in order), using the first-fit algorithm, in which partition would the process requiring 426 K be placed?
A. 500 K
B. 200 K
C. 300 K
D. 600 K
E. None
Answer: E. None. These are fixed partitions. First Fit assigns 212 K to 500 K, 417 K to 600 K and 112 K to 200 K. The 100 K and 300 K partitions remain free, while unused space inside assigned partitions cannot be reused. Neither free partition can hold 426 K.
Contiguous allocation MCQs 4-6: trace every request
Question 4 (GATE 1994)
A heap has, in increasing address order, 50 units in use, 150 free, 300 in use, 350 free and 600 in use. The requests 300, 25, 125 and 50 arrive in that order. Which policy can satisfy the sequence?
A. Either First Fit or Best Fit
B. First Fit but not Best Fit
C. Best Fit but not First Fit
D. None of the above
Answer: B. First Fit but not Best Fit. First Fit changes the holes from [150, 350] to [150, 50], then [125, 50], then [50], so every request fits. Best Fit uses the 50-unit hole for 25 and later leaves [25, 25], so the final 50-unit request fails.
Question 5 (ISRO 2018)
A computer has 1000 K of main memory. The jobs arrive and finish in the sequence Job 1 requiring 200 K arrives Job 2 requiring 350 K arrives Job 3 requiring 300 K arrives Job 1 finishes Job 4 requiring 120 K arrives Job 5 requiring 150 K arrives Job 6 requiring 80 K arrives Among best fit and first fit, which performs better for this sequence?
A. First fit
B. Best fit
C. Both perform the same
D. None of the above
Answer: A. First fit. Jobs 1 to 3 use 850 K, leaving 150 K. Job 1 releases 200 K. First Fit leaves 80 K after Job 4, then Jobs 5 and 6 take 150 K and 80 K. Best Fit leaves 30 K after Job 4 and 50 K after Job 5, so Job 6's 80 K fails.
Question 6 (DSSSB 2021)
A free list contains three memory areas of sizes 6 KB, 15 KB and 12 KB.
The next three memory requests are for 10 KB, 2 KB and 14 KB.
Which of the memory allocation strategy would be able to accommodate all the three requests?
A. Worst Fit
B. Best Fit
C. Next Fit
D. First Fit
Answer: B. Best Fit. It gives 12 - 10 = 2 KB, uses that remainder, then places 14 KB in 15 KB. First Fit leaves [4, 5, 12] KB, so 14 KB fails.
Contiguous allocation MCQs 7-9: internal and external fragmentation
Question 7 (DSSSB 2021)
If a memory partition of size 80k is allocated to a process of size 60k then the 20k of the partition is wasted and cannot be allocated to any process. It is called __________.
A. external fragmentation
B. best fit
C. worst fit
D. internal fragmentation
Answer: D. internal fragmentation. The waste is 80k - 60k = 20k. It lies inside the partition, so it is internal. External fragmentation consists of outside holes.
Question 8 (DSSSB 2021)
If two non-continuous free partition of size ‘a’ and ‘b’ are available. A process of size ‘c’ cannot be allocated even when a + b > c, a < c and b < c . This problem is known as __________.
A. external fragmentation
B. internal fragmentation
C. quick fit
D. worst fit
Answer: A. external fragmentation. With a = 40 KB, b = 35 KB and c = 60 KB, 75 KB is free but the largest hole is 40 KB. A contiguous request cannot combine non-adjacent holes.
Question 9 (KVS 2013)
Both the first-fit and best-fit strategies for memory allocation suffer from
A. External fragmentation
B. Internal fragmentation
C. 50-percent rule
D. Segmentation
Answer: A. External fragmentation. Both policies split holes. Allocation and release scatter free space. Their patterns differ, but neither removes external fragmentation. The 50-percent rule is not a fragmentation type.
Contiguous allocation MCQs 10-12: compaction and hole counts
Question 10 (BPSC 2023)
_____ is used to shift processes so they are contiguous, and all free memory is in one block.
A. Fragmentation
B. Compaction
C. External Fragmentation
D. More than one of the above
E. None of the above
Answer: B. Compaction. It relocates processes so holes join into one block. Fragmentation names the problem. Compaction costs movement and needs relocation support. It changes contiguity, not free memory.
Question 11 (DSSSB 2021)
A 500 kbyte memory is managed using variable memory partitions and compaction is allowed. It is currently using 2 partitions of sizes 100 kbytes and 130 kbytes respectively. The smallest allocation request in kbytes that could be denied is _____.
A. 250
B. 270
C. 271
D. 170
Answer: C. 271. Used memory is 100 + 130 = 230 kbytes, leaving 270 kbytes. Compaction joins the pieces, so requests through 270 kbytes fit. The next whole-kbyte request is 271.
Question 12 (GATE 2026)
Eight non-adjacent holes have sizes 20 KB, 4 KB, 25 KB, 18 KB, 7 KB, 9 KB, 15 KB and 12 KB. Processes P1 of 16 KB and P2 of 9 KB arrive in that order and use Best Fit. After both allocations, how many holes are smaller than 8 KB?
Answer: 3. P1 enters the 18 KB hole and leaves 2 KB. P2 takes the exact 9 KB hole, which then disappears. The final holes smaller than 8 KB are 4 KB, 2 KB and 7 KB, so the count is 3.
Common traps in contiguous allocation
Trap to recognise | Questions |
|---|---|
Policy word to hole choice | Q1 to Q3 |
Update the hole list after every request | Q4 to Q6 |
Inside waste versus separated holes | Q7 to Q9 |
Compaction changes usable contiguity, not total free memory | Q10 to Q11 |
Count residual holes after Best Fit and exact fits | Q12 |
Copy holes in order, circle sufficient holes, apply the policy and replace the selected hole with its remainder. Combine space only when compaction is allowed.
This collection owns contiguous partition placement, fit policies, fragmentation and compaction. Memory & Paging MCQs: 12 Solved (GATE) is the wider mixed set, with memory-management basics, paging, page tables and TLB calculations. Next, try Virtual Memory and Demand Paging MCQs.
Contiguous allocation: the next practice step
Retest Q3, Q4, Q6, Q8, Q11 and Q12 without looking. They cover fixed partitions, a full fit-policy trace, policy choice, external fragmentation, compaction and residual-hole counting. Placement-focused readers can follow Computer Science Fundamentals for Placements by Sanchit Sir, while semester learners can use ZERO TO HERO for a sequenced Operating Systems route. Before choosing an option, write the current hole list, allocation policy and compaction assumption.




