Get premium membership and access questions with answers, video lessons as well as revision papers.

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


Next: Compare bitmap-based allocation of blocks on disk with a free block list
Previous: Why might the direct blocks be stored in the inode itself?

View More Operating Systems Questions and Answers | Return to Questions Index


Learn High School English on YouTube

Related Questions