Ask Question
24 October, 18:42

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?

+2
Answers (1)
  1. 24 October, 19:43
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers