Fragmentation in Operating System (original) (raw)

Last Updated : 8 Jan, 2026

Fragmentation in computing is the process in which a file, such as a data file or an executable program, is divided into smaller fragments that are stored in different parts of a storage medium, such as a hard disk or RAM. When a file is fragmented, its fragments are stored in non-contiguous blocks, meaning they are not placed next to each other. This can lead to inefficient use of memory or storage and slower access to files. Fragmentation occurs both in memory (RAM) and storage, and it is a common challenge in operating systems that affects overall system performance.

Cause of Fragmentation

Effect of Fragmentation

Types of Fragmentation

In an operating system, fragmentation mainly occurs in two different forms based on how memory or storage space is utilized. These types explain where and how unused space is created during memory or storage allocation. The two main types of fragmentation are:

**1. Internal Fragmentation

Internal fragmentation

**2. External Fragmentation

External fragmentation

Fragmentation can also occur at various levels within a system. File fragmentation, for example, can occur at the file system level, in which a file is divided into multiple non-contiguous blocks and stored on a storage medium. Memory fragmentation can occur at the memory management level, where the system allocates and deallocated memory blocks dynamically. Network fragmentation occurs when a packet of data is divided into smaller fragments for transmission over a network.

Impact of Fragmentation on Operating System Performance

Advantages

Disadvantages