51.1k views
4 votes
g Assume that a file system has each disk block of size 4KB and each block pointer of 4 bytes. In addition, the each inode in this system has 14 direct pointers, 2 single indirect pointers, 1 double indirect and 1 triple indirect pointer. Ignoring the space for inode, answer the following questions for this file system: (a) What is the maximum possible file size? (b) How much overhead (amount of non-data information) for the maximum file size derived in (a)? (c) How much overhead for a file of size 6GB?

User Souvickcse
by
6.0k points

1 Answer

2 votes

Answer:

a) 4100.00 GB

b) 4.0039 GB

c) 6291456 B

Step-by-step explanation:

Given:

14 direct pointers

2 single indirect pointers =
2^1^0

1 double indirect pointer =
2^2^0

1 triple indirect pointer =
2^3^0

a) Let's first find the number of block pointers in one disk block.

Size of disk block / disk block address


= (4*1024)/(4B) = 1024 = 2^1^0

A single indirect pointer can address up to 1024 or
2^1^0 blocks

The maximum possible file size, will be:


[14 + 2^1^0 + 2^1^0 + 2^2^0 + 2^3^0] 4KB

= 4100.00 GB

b) For overhead:


[14 + 2^1^0 + 2^1^0 + 2^2^0 + 2^3^0] 4B

= 4.0039 GB

c) For overhead for a file of 6GB,

we need to check for the required number of block pointers :


(6 * 2^3^0 )/(4 * 2^1^0) = 1572864 B

The overhead for a file of 6GB will be:

1572864 * 4 =

= 6291456 B

User Kiirani
by
5.4k points