Aptitude Overflow
+8 votes
895 views

In a particular Unix OS, each data block is of size 1024 bytes, each node has 10 direct data block addresses and three additional addresses: one for single indirect block, one for double indirect block and one for triple indirect block. Also, each block can contain addresses for 128 blocks. Which one of the following is approximately the maximum size of a file in the file system?

  1. 512 MB
  2. 2 GB
  3. 8 GB
  4. 16 GB
asked in Operating System by (21.2k points) 125 160 160 | 895 views

3 Answers

+14 votes
Best answer
Answer: B

Maximum file size = 10*1024 Bytes + 1*128*1024 Bytes + 1*128*128*1024 Bytes + 1*128*128*128*1024 Bytes = approx 2 GB.
answered by (35.6k points)
selected by
How to solve its calculation part?
the largest term is 2^31 which acoounts to 2 GB.
TRIPLE INDIERECT FILE SIZE IS 2 GB....WHY DO WE DON'T CONSIDER SIZE OF OTHER FILES?
+3 votes

Size of File/Levels      

Direct Address         

Indirect Address-1                

Indirect Address-2                

Indirect Address-3                     

Level-0 10*1024 B           1             1               1
Level -1   1*128*1024 B 1*128*1024 B 1*128*1024 B
Level- 2     1*128*128*1024 B     1*128*128*1024 B    
Level -3       1*128*128*128*1024 B

Add the Principle Diagonal Values = 2.01575 GB = Approx. 2.0 GB

answered by (3.1k points)
why multiplied by 1 in indirect address (though it will not effect the result but just curious about it )
+2 votes

Its 2GB

answered by (7.4k points)
pls somebody make it understand to mee pls pls explain
a big thanks in advance

They are asking size of the file. That means all we need to calculate is number of blocks*size of block to know the size of file. since files are being stored as blocks. 

 To calculate total number of blocks 

Block size =1024 bytes

1)Directly given blocks   10*1024 bytes

2)single indirect block    1*128*1024 bytes  (since 1 block is pointing to a block which has 128 address of 128 blocks each of size 1024. since it is given each block will have address of 128 other blocks

3)double, triple indirects with same logics 

totally adding them gives total block sizes

Related questions

2,706 questions
981 answers
387 comments
31,354 users