The Gateway to Computer Science Excellence
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.
in Operating System by Veteran (59.1k points) | 28 views

1 Answer

0 votes


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\;\%$


by Boss (19.1k points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,339 answers
105,204 users