Fragmentation
Fragmentation
1. External fragmentation
2. internal fragmentation
External fragmentation
Total free RAM space is enough to load a process but the process still can’t load because free blocks of
RAM are not contiguous. In other words, we can say that all free blocks are not located together. For
example, in the following diagram, we have a total 10 KB space free but it is not together located, so if a
process with 10KB size wants to loads on the RAM, then can’t load due to external fragmentation. But in
the diagram on the right side we can see that 10KB space is contiguously free, so here if a process of
10KB wants to load on the RAM then can execute.
Internal Fragmentation
Internal Fragmentation Internal fragmentation occurs when fixed sized memory blocks are available and
a process gets a block that is too much larger than the storage requirement of a process. The worst fit is
mostly a big reason for internal fragmentation.
Comparison of when fragmentation occurs External Fragmentation: When the process releases the
RAM, it creates the free space in the RAM which leads to cause external fragmentation.
Internal Fragmentation: When the memory assigned to the process is greater as compared to the
memory requested by the process.
Uniprogramming
Multiprogramming
Uniprogramming
In uni-programming, the operating system divides them into two main parts. one part is dedicated to
the operating system and another part is dedicated to the user processes.
Multiprogramming
multiprogramming is a technique which allows multiple users to share the memory at the same time.
this is a very important feature of the operating system.
Contiguous memory allocation contiguous memory means that all the free blocks of memory are closely
neighboured with each other.
Noncontiguous memory allocation Non-contiguous memory allocation means that all the free blocks of
memory are not closely neighboured with each other.