Internal fragmentation — Aptitude Question
Internal fragmentation: Which memory-management scheme suffers from internal fragmentation? Answer and worked solution on CodeKairo.
- Topic: OS, DBMS & Networks
- Section: Programming MCQs
- Difficulty: Easy
- Time target: 60 seconds
Question
Which memory-management scheme suffers from internal fragmentation?
Options
- Paging
- Segmentation
- Both equally
- Neither
Show the answer and the worked solution
Correct answer: A. Paging
Worked solution
- Paging divides memory into fixed-size frames, and a process rarely fills its final page exactly; the unused tail of that frame is wasted inside an allocated block, which is internal fragmentation.
- Segmentation allocates variable-size blocks sized to each segment, so nothing is wasted inside a block. Its waste appears as unusable gaps between blocks, which is external fragmentation.
Answer: Paging.
The idea
Fixed-size allocation means internal fragmentation; variable-size allocation means external fragmentation. Remembering which way round they go settles most memory-management MCQs.
Shortcut. A 10 KB process in 4 KB pages takes 3 pages, 12 KB, and wastes 2 KB inside its last page; waste inside an allocation is internal fragmentation.
Common trap. "Segmentation" is famous for fragmentation, but its waste is external: holes between variable-sized segments, not inside them.