# GATE - 2012 | OS | A file system with 300 GByte disk uses a file descriptor with 8 direct block

## Question:

A file system with 300 GByte disk uses a file descriptor with 8 direct block addresses, 1 indirect block address and 1 doubly indirect block address. The size of each disk block is 128 Bytes and the size of each disk block address is 8 Bytes. The maximum possible file size in this file system is

 A 3 KBytes B 35 KBytes C 280 KBytes D dependent on the size of the disk

## Solution:

### Option (B) is Correct.

It’s given disk block is of size 128B.

So, one direct block addressing will point to 8 disk blocks = 8*128 B = 1 KB

Singly Indirect block addressing will point to 1 disk block which has 128/8 disc block addresses = (128/8)*128 B = 2 KB

Doubly indirect block addressing will point to 1 disk block which has 128/8 addresses to disk blocks which in turn has 128/8 addresses to disk blocks = 16*16*128 B = 32 KB

Maximum possible file size = 1 KB + 2 KB + 32 KB = 35 KB

Thank You