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

As shown in Figure 4-33, a Unix i-node has 10 direct address entries, and one si

ID: 3817089 • Letter: A

Question

As shown in Figure 4-33, a Unix i-node has 10 direct address entries, and one single, double, and triple indirect address entries. If a disk block has 4K bytes and a disk address uses 4 bytes, what would be the largest file size based those assumptions? Please show the intermediate results as asked below:

2.1) Disk space pointed by the 10 direct addresses: __________________________________________;

2.2) Disk space pointed by the single indirect block: _________________________________________;

2.3) Disk space pointed by the double indirect block: _________________________________________;

2.4) Disk space pointed by the triple indirect block: __________________________________________;

2.5) The total space pointed by the i-node: __________________________________________________;

I-node Attributes Single Double indirect block Triple indirect block Figure 4-33. A UNIX -node. Addresses of data blocks

Explanation / Answer

.1) Disk space pointed by the 10 direct addresses:

Each Address is 4 bytes, so 10 * 4 bytes = 40 bytes of disk space pointed by the 10 direct addresses.

2.2) Disk space pointed by the single indirect block:

Each Address is 4 bytes.

Disk block size is 4K bytes.

So, 4K bytes / 4 bytes = 1K blocks

Therefore Disk space pointed by single indirect block is: 1K blocks * 4KB for each block size = 4 MB

2.3) Disk space pointed by the double indirect block:

Each Address is 4 bytes.

Disk block size is 4K bytes.

So, 4K bytes / 4 bytes = 1K blocks

Therefore Disk space pointed by Double indirect block is: 1K Blocks * 1K Blocks * 4KB for each block size = 4 GB

2.4) Disk space pointed by the triple indirect block:

Each Address is 4 bytes.

Disk block size is 4K bytes.

So, 4K bytes / 4 bytes = 1K blocks

Therefore Disk space pointed by Triple indirect block is: 1K blocks * 1K blocks * 1K blocks * 4KB for each block size = 4 TB

2.5) The total space pointed by the i-node:

Summing from 2.1 to 2.2 answers gives:

40 bytes + 4 MB + 4 GB + 4 TB, which is approximately 4 TB.