Trusted by millions of Kenyans
Study resources on Kenyaplex

Get ready-made curriculum aligned revision materials

Exam papers, notes, holiday assignments and topical questions – all aligned to the Kenyan curriculum.

How can the block count in an in order differ from the (file size / block size) rounded up to the nearest integer. Can the block...

How can the block count in an in order differ from the (file size / block size) rounded up to
the nearest integer. Can the block count be greater, smaller, or both

Answers


Faith
Block count frequently differs from file size. File size is the offset of the highest byte written, and is what you commonly notice in files that you deal with everyday. Block count is a count of the number of
physical disk blocks that are used by the file. In the example of a sparsely populated file, such as a
BitTorrent download of a 700 MB Linux ISO – it uses up '700 MB' on your system at the beginning, long
before the actual 700 MB of the file's contents are actually written to your disk blocks. However, most
files are non sparse and disk block usage should be equal to file size. In reality, disk block usage is
actually a little higher, as there are additional blocks (metadata, etc) not considered in the file size.

Therefore disk block count can differ in any way from the file size, or even be equal with the right trade-off between sparsity and additional block usage.
Titany answered the question on April 26, 2022 at 11:33

Answer Attachments

Exams With Marking Schemes

Related Questions