3,167 views
1 votes
1 votes
Consider $6$ memory partitions of sizes $200$ $\text{KB}$, $400$ $\text{KB}$, $600$ $\text{KB}$, $500$ $\text{KB}$, $300$ $\text{KB}$and $250$ $\text{KB}$, where $\text{KB}$refers to $\text{kilobyte}$. These partitions need to be allotted to four processes of sizes $357$ $\text{KB}$, $210$ $\text{KB}$, $468$ $\text{KB}$, $491$ $\text{KB}$in that order. If the best-fit algorithm is used, Amount of internal and external fragmentation occurs is?

 

I am getting internal fragmentation as 124 KB, whereas nothing can be say about external fragmentation as we don't know what will be the size of the next coming process. And external fragmentation can only be calculated when we have the information about free memory slots and the process size whose size must be greater than Max free slot size.

Someone verify it.

1 Answer

0 votes
0 votes
357 fit into 400

210 fit into 250

468 fit into 500

now 491 should be fit into 500 not in  600 because of best fit is used  

so 491  will wait until 500 will become  empty and after that it will go into 500

so internal fragmentation=124 KB

we know very well that when there is a internal fragmentation than there will be external fragmentation

than  EF>=124 KB

why EF>= 124 ? because the space  124 KB which remained left can not be allocated to any other because it is static partition (lets consider a senario in which  all the remaining slot that is is completely filled by the three more process 200 ,300,600   now take  one more process  1 KB. we can not allocate this even through space is available .here main thing is that the space 124 can not be allocated so i count it in EF)

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------

but answer will be different if it was dynamic partation

at this case there will be no internal fragmentation and we can not say nothing about EF

Related questions

2 votes
2 votes
1 answer
1
Sandip Shaw asked Nov 12, 2015
2,439 views
I always get confused between internal and external fragmentation.Is there any relation between them?pls explain in detail
0 votes
0 votes
1 answer
2
Veer123 asked Sep 2, 2022
327 views
If the main memory is divided into 4 fixed sized partitions of 5KB each and each of them is occupied by processes of 4KB each can I say that the total 4KB of space unused...
1 votes
1 votes
2 answers
3
kapilbk1996 asked Jul 28, 2018
2,532 views
"Linked allocation of files on a disk space can lead to internal fragmentation"Is this statement true or false? Justify your answer.
0 votes
0 votes
1 answer
4
rishu_darkshadow asked Sep 26, 2017
629 views
Assume N segments in memory and a page size of P bytes. The wastage on account of internal fragmentation is: