305 views
2 votes
2 votes

Unix I-node has disk block size 8 KB and maximum file possible with the double indirect is 32 GB. Then the number of bits which represents disk block address is _______ bits.

2 Answers

Best answer
3 votes
3 votes

We know ,

File size using double indirect pointer  = ( Disk block size / Disk block address )2  * ( Disk block size )

                  ==>  (Disk block address)2   =  ( Disk block size )3 / File size

                  ==>  (Disk block address)2   =  239 B / 235 B

                  ==>  (Disk block address)2   =  16 B

                  ==>  Disk block address   =    4 B   =   32 bits

So we need 32 bits addresses for the desired purpose..

selected by
3 votes
3 votes
Suppose DBA requires x bytes.

So, number of address in one block = 8K/x

Thus maximum possible file size (roughly) = size of double indirect block = 32GB

(8K/x)^2 * 8K = 32GB

x^2 = 8 * 8 * 8 * 2^30 / (32 * 2^30) = 16

x = 4B = 32bits

Related questions

0 votes
0 votes
0 answers
3
Mrityudoot asked Jan 14
135 views
In it’s solution how are they obtaining x with the given operation? Should we not have 1 more register to keep x separate?