Consider the Ex where We have Free spaces of size ...
100 Kb,25 Kb,50 Kb and 20 Kb...
Now we are using say "Contigious" Allocation METHOD...where one process can be allocated in one hole/free spaces.
Now upcoming Processes are of size like 80 Kb,20 Kb,30 Kb,10 Kb ...say for ex we allocated them like 80 Kb process in 100 Kb hole , 20 Kb process in 25 Kb hole ,30 Kb process in 50 Kb hole ,10 Kb process in 20 Kb hole ...
So internal Fragments in holes are
Holes |
Internal Fragmentation |
H1 of 100 Kb |
20 Kb |
H2 of 25 Kb |
5 Kb |
H3 of 50 Kb |
20 Kb |
20 Kb |
10 Kb |
Now Free space Still in MAIN MEMORY IS 20+5+20+10=55 Kb....
Now even if we got a new Process of 30 Kb ...we should have allocate it to MM ...but as the SPACE is NON-CONTIGIOUS ..we cant allocate memory to new process ...
That is DEFINITION OF "EXTERNAL FRAGMENTATION" .... that though we have enough memory to satisfy the requirement of Process we cant allocate it ...
Hence Internal Fragmentation leads to External FRAGMENTATION....