Skip to content
Search

Fragmentation

lastmod 2018-08-17created 2016-11-111 edits

Fragmentation is the phenomenon in which the free space or the data in a storage device is split into multiple pieces. It causes problems such as reducing the usable space of the storage device or slowing down read and write performance.

Types of fragmentation

Internal fragmentation

Occurs when storage is allocated unintentionally. Space is wasted. The term "internal" means that the unneeded storage lies inside the allocated region but is not used.

Can occur when paging is used as an operating system memory management technique. When a process is allocated to pages of a fixed size, internal fragmentation occurs if the process is smaller than the page.

External fragmentation

The phenomenon in which free space is split into multiple pieces. It occurs when a program allocates and frees the remaining regions of storage of various sizes, and it weakens the allocation algorithm. Although the remaining storage space can be used, the pieces are too small to support the application's performance, so it cannot be used effectively. The term "external" means that the unusable storage lies outside the allocated regions.

Data fragmentation

Occurs when data in a storage device is split into multiple pieces. It usually happens when trying to put large data into a storage device suffering from external fragmentation.

Defragmentation techniques

The basic defragmentation methods that can be applied to memory or disks are coalescing and compaction.

Memory defragmentation

The internal fragmentation problem can be solved by using the frame technique to divide memory into fixed-size units for management.

Disk defragmentation

This can be done by physically reorganizing the contents of the disk so that each file is stored contiguously. Some defragmentation programs also keep small, frequently accessed files in a single directory.

See also

Favorite site