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

Assume all disk blocks are of size 8KB. Top level of a UNIX inode is also stored

ID: 3576784 • Letter: A

Question

Assume all disk blocks are of size 8KB. Top level of a UNIX inode is also stored in a disk block of size 8KB. All file attributes, except data block locations, take up 256 bytes of the top-level of inode. Each direct block address takes up 8 bytes of space and gives the address of a disk block of size 8KB. Last three entries of the first level of the inode point to single, double, and triple indirect blocks respectively.

Calculate (a) the largest size of a file that can be accessed through the direct block entries of the inode. (b) The largest size of a file that can be accessed using the entire inode.

Explanation / Answer

1a )inode structure

In this

the largest size of a file that can be accessed through the direct block entries of the inode=520Kb

1b)

Assume that there are 1 indirect pointer, 1 double indirect pointer, and 1 triple indirect pointer

* Assume that the size of the data blocks is 8 kb, i.e., BlockSize = 8 kb

* Assume that the block numbers are represented as 8byte unsigned integers, i.e., BlockNumberSize = 8b

* Some data blocks are used as index blocks. They store 8kb / 8bytes/entry = 256 entries

* Maximum number of bytes addressed by single indirect pointer is

    = NumberOfEntries * BlockSize

    = (Blocksize / BlockNumberSize) * BlockSize

    = (8Kb / 8b) * 8Kb

    = 1000 * 1Kb

    = 1000kb=1MB

* Maximum number of bytes addressed by double indirect pointer is

    = NumberOfEntries^2 * BlockSize

    = (Blocksize / BlockNumberSize)^2 * BlockSize

  = (8Kb / 8b)^2 * 8Kb

    =85MB

* Maximum number of bytes addressed by triple indirect pointer is

    = NumberOfEntries^3 * BlockSize

    = (Blocksize / BlockNumberSize)^3 * BlockSize

    = (8Kb / 8b)^3 * 8Kb

    =

    = 8 Gb

* Maximum file size is 1MB + 85Mb +8192mb=8278MB

The largest size of a file that can be accessed using the entire inode=8278MB

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