1. The formula for maximum file size for the current UNIX BSD file system is given by:
    210 * (10 + 28 + 216 + 224)

    Each pointer points at a 1KB (i.e., 210 B) data block.  There are 10 pointers directly to data blocks, one pointer to an indirect block that contains 28 (i.e., 256) pointers to data blocks, one    pointer to a doubly-indirect block that points to 28 indirect blocks (each of which points to 28 data blocks), and one pointer to a triply-indirect block (that points to 28 doubly-indirect blocks, each of which points to a singly-indirect block, etc.).

  1. If we add a quadruply indirect block pointer to the file header then the maximum size that a file could be (in bytes) is given by  the formula:

  2. 210 * (10 + 28 + 216 + 224 + 232) =  242 + 234 + ...

    1. If we increase the block size to 4KB then the formula becomes:

    2.     212 * (10 + 210 + 220 + 230) =  242 + 232 + ...

      Therefore adding a quadruply indirect block pointer to the file header will allow larger file sizes than increasing the block size to 4KB.
       

  1. We need to update the following information on the disk:
   We accepted any order for the above disk write operations, as long as you said that they get written to the disk immediately instead of after 30 seconds.

   Since UNIX employs 30-second write-behind for user data, the 16 data blocks comprising the contents of "foo" get written to disk by the operating system at the next 30 second "write-flush" instance.