1,173 views
0 votes
0 votes
A certain file system uses $4-KB$ disk blocks. The median file size is $1 KB.$ If all files were exactly $1 KB,$ what fraction of the disk space would be wasted? Do you think the wastage for a real file system will be higher than this number or lower than it? Explain your answer.

1 Answer

0 votes
0 votes

Answer:

Each of the $4\;\text{KB}$ block will contain $1$ file if all files are of $1\;\text{KB}$ size, and other $3\;\text{KB}$ space will be wasted. This is because it is not permitted to keep two files in a single block. So, it will make the wastage of $75\%$ space. 

In real practice, since most fo the file systems have a mixture of small and large files altogether, hence space is used more efficiently. 

Example: For a file of size $33,423\;\text{Bytes}$, $9$ Disk Blocks will be used for the storage and the efficiency will be $\frac{33,423}{34816}\times 100 = 95.999\;\%$

 

Related questions

0 votes
0 votes
1 answer
1
0 votes
0 votes
0 answers
3