

As a result, the 1MB of free space in this block is unused and cannot be used to allocate memory to another process. Let's suppose a process P1 with a size of 3MB arrives and is given a memory block of 4MB. The Operating System uses a part of this RAM. 2MB, 4MB, 4MB, and 8MB are the available sizes. Due to this, the free space of the memory block is unused, which causes internal fragmentation.Īssume that memory allocation in RAM is done using fixed partitioning (i.e., memory blocks of fixed sizes). When a process is allocated to a memory block, and if the process is smaller than the amount of memory requested, a free space is created in the given memory block.

There are mainly two types of fragmentation in the operating system. Main memory is available, but its space is insufficient to load another process because of the dynamical allocation of main memory processes. Many spaces remain after process loading and swapping that another process cannot load due to their size. User processes are loaded and unloaded from the main memory, and processes are kept in memory blocks in the main memory. As the process is loaded and unloaded from memory, these areas are fragmented into small pieces of memory that cannot be allocated to incoming processes. The conditions of fragmentation depend on the memory allocation system. These small blocks cannot be allotted to new arriving processes, resulting in inefficient memory use. It is also necessary to understand that as programs are loaded and deleted from memory, they generate free space or a hole in the memory. Processes can't be assigned to memory blocks due to their small size, and the memory blocks stay unused. What is Fragmentation?įragmentation is an unwanted problem in the operating system in which the processes are loaded and unloaded from memory, and free memory space is fragmented. In this article, you will learn about fragmentation and its types. As the process is loaded and unloaded from memory, these areas are fragmented into small pieces of memory that cannot be allocated to coming processes. These RAM spaces are divided either by fixed partitioning or by dynamic partitioning. Processes can't be assigned to memory blocks due to their small size, and the memory blocks stay unused.Ĭontiguous memory allocation allocates space to processes whenever the processes enter RAM. Next → ← prev Fragmentation in Operating Systemįragmentation is an unwanted problem in the operating system in which the processes are loaded and unloaded from memory, and free memory space is fragmented.
