Fragmentation
Fragmentation refers to the condition of a disk in which files are divided into pieces scattered around the disk. Fragmentation occurs naturally when you use a disk frequently, creating, deleting, and modifying files. At some point, the operating system needs to store parts of a file in noncontiguous clusters.
Differentiate internal and external fragmentation:
BASIS FOR
COMPARISON |
INTERNAL FRAGMENTATION |
EXTERNAL FRAGMENTATION |
Basic |
It occurs when fixed sized memory blocks are allocated to the processes. |
It occurs when variable size memory space are allocated to the processes dynamically. |
Occurrence |
When the memory assigned to the process is slightly larger than the memory requested by the process this creates free space in the allocated block causing internal fragmentation. |
When the process is removed from the memory, it creates the free space in the memory causing external fragmentation. |
Solution |
The memory must be partitioned into variable sized blocks and assign the best fit block to the process. |
Compaction, paging and segmentation. |