Ask Question
9 January, 19:29

If a filesystem has a block size of 4096 bytes, this means that a file comprised of only one byte will still use 4096 bytes of storage. A file made up of 4097 bytes will use 4096*2=8192 bytes of storage. Knowing this, can you fill in the gaps in the calculate_storage function below, which calculates the storage size needed for a given filesize?

+4
Answers (1)
  1. 9 January, 22:47
    0
    For every file size between 1 to 4096 bytes, 4096 bytes of storage will be use. For file size of 4097 to 8192 bytes, 8192 bytes of storage will be used. Therefore for file size between 8193 to 12288 bytes, 12288 bytes of storage will be used

    Explanation:

    This is means that for every file size between 1 and 4096 bytes, the maximum storage capacity of 4096 bytes at that range will be used in as storage. 1 byte above 4096 bytes, the next 4096 bytes of storage will be used. therefore 1 byte above 8192 bytes, the next 4096 bytes of storage will be used. Therefore, for every 1 to 4096 bytes, 4096 bytes will be used, and above that, the next 4096 byte of storage will be considered in its multiple.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “If a filesystem has a block size of 4096 bytes, this means that a file comprised of only one byte will still use 4096 bytes of storage. A ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers