Skip to content
Related Articles

Related Articles

GATE | GATE-IT-2004 | Question 67

View Discussion
Improve Article
Save Article
  • Last Updated : 14 Feb, 2018

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?

(A) 512 MB
(B) 2GB
(C) 8GB
(D) 16GB

Answer: (B)

The diagram is taken from Operating System Concept book.

Maximum size of the File System = Summation of size of all the data blocks
                                  whose addresses belongs to the file.

Size of 1 data block = 1024 Bytes
No. of addresses which 1 data block can contain = 128

Now, Maximum File Size can be calculated as:
10 direct addresses of data blocks = 10*1024
1 single indirect data block = 128*1024
1 doubly indirect data block = 128*128*1024
1 triple indirect data block = 128*128*128*1024

Max File Size = 10*1024 + 128*1024 + 128*128*1024 + 
                128*128*128*1024 Bytes
              = 2113674*1024 Bytes
              = 2.0157 GB ~ 2GB

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!