Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider a file system that uses inodes to represent files. To locate the physic

ID: 3817431 • Letter: C

Question

Consider a file system that uses inodes to represent files. To locate the physical blocks of each file, its inode contains up to 12 direct disk blocks, as well as one single, one double, and one triple indirect disk blocks. a. If disk blocks are 1 KB in size, and a pointer to a disk block requires 4 bytes. What is the maximum size of a file that can be stored in this file system? Note the size of a file does not include the size of its metadata, i.e., the inode and indirect blocks. b. In view of the limited file size caused by small disk blocks, the file system starts to use disk blocks of 8 KB in size. In addition, a pointer to a disk block now requires 8 bytes. What is the maximum size of a file that can be stored in the updated file system? Again, the size of a file does not include the size of its metadata, i.e., the inode and indirect blocks.

Explanation / Answer

7a. 12 direct disk blocks = 12 KB

1 indirect disk block has 1024 / 4 = 256 block address = 256 KB

1 double indirect disk block will have (1024/4)*(1024/4) = 65536 KB = 64 MB

1 triple indirect disk block will have (1024/4)*(1024/4)*(1024/4) = 16777216 KB = 16384 MB = 16 GB

So, maximum file size = 16 GB 64 MB 268 KB

7b.

12 direct disk blocks = 96 KB

1 indirect disk block has 1024*8 / 8 = 1024 block address = 8192 KB = 8 MB

1 double indirect disk block will have (1024*8/8)*(1024*8/8)*8 = 1048576*8 = 8388608 KB = 8192 MB = 8 GB

1 triple indirect disk block will have (1024*8/8)*(1024*8/8)*(1024*8/8)*8 = 8589934592 KB = 8388608 MB = 8192 GB

So, maximum file size = 8200 GB 8 MB 96 KB

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote