Search code examples
fileunixoperating-systemfilesystemsinode

Maximum file size supported by a file representation of a node?


enter image description here

For a I feel like it would be 63504 Bytes because the file size would be (496/4)*512 + 16 Bytes.. But I cant seem to get that in the requested format, which leads me to believe that I attempted it wrong.

For pt b I have no Idea how to approach it.. Any help/hints would be appreciated


Solution

  • Part [a]

    Starting with 
    
                  Extent size 1 ==> File size will be 2^0 * 512 bytes 
    
                  Extent size 2 ==>File size will be  2^1 * 512 bytes
    
                  Extent size 3 ==>File size will be  2^2 * 512 bytes
    
                  ......
    
                  Extent size 12 ==>File size will be  2^11 * 512 bytes
    
                  Extent size x ==>File size will be  2^(x-1) * 512 bytes
    

    Part [b]

    Considering 512 bytes as block size,
    
    Number of disk accesses required for getting 1,00,000 byte will be,
    
    100000/512  = 196
    

    I hope it does make sense to you....