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?

Respuesta :

Answer:

a) 4100.00 GB

b) 4.0039 GB

c) 6291456 B

Explanation:

Given:

14 direct pointers

2 single indirect pointers =[tex]2^1^0[/tex]

1 double indirect pointer = [tex]2^2^0[/tex]

1 triple indirect pointer = [tex]2^3^0[/tex]

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

Size of disk block / disk block address

[tex] = \frac{4*1024}{4B} = 1024 = 2^1^0[/tex]

A single indirect pointer can address up to 1024 or [tex]2^1^0[/tex] blocks

The maximum possible file size, will be:

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

= 4100.00 GB

b) For overhead:

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

= 4.0039 GB

c) For overhead for a file of 6GB,

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

[tex] \frac{6 * 2^3^0 }{4 * 2^1^0} = 1572864 B [/tex]

The overhead for a file of 6GB will be:

1572864 * 4 =

= 6291456 B

Q&A Education