Garrick
Garrick

Reputation: 689

Internal and External memory fragmentation

I am currently reading OS and read about internal and external memory fragmentation.

Internal fragmentation is based on fixed size partitioning. For example = paging is based on fixed size partitioning and hence, paging suffers from internal fragmentation.

On the other hand, External fragmentation is based on variable size partitioning. For example = segmentation is based on dynamic variable size partitioning and hence, segmentation suffers from external fragmentation.

So, my doubt is there is internal fragmentation in paging, so it has 0 external fragmentation or there is something very small, so we can neglect that and
Similarly, for segmentation, does it also has 0 internal fragmentation or very small, that can be neglected?

Is my understanding right ?

Upvotes: 0

Views: 3608

Answers (1)

geeky_guy
geeky_guy

Reputation: 21

Internal fragmentation is sujected to "Fixed size partitioning scheme" and external fragmentation to "variable size partitioning ". No, there can never be external fragementation in fixed size partitioning because the leftover space cannot be used to allocate to any other process. External fragmentation occurs only when "there is space available which can be allocated to the process but due to non availability of enough contiguous space,the available space cannot be allocated". On the other hand,in case of variable size partitioning, there can never be internal fragmentation because the lefover space can be allocated to the process of same or less than the available space(though the probability of allotment could be very less). We can remove internal fragmentation and external fragmentation, if we can use a method "non-contiguous allocation" in "variable size partitioning".

Upvotes: 2

Related Questions