# 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.

156 views
in Computer
closed
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
1. 3 KBytes
2. 35 KBytes
3. 280 KBytes
4. dependent on the size of the disk

by (30.1k points)
selected by

Correct Answer - Option 2 : 35 KBytes

The correct answer is option 2

DATA:

In the index node of a Unix- style file system,

Direct Block pointer = 8

Single Indirect Block pointer = 1

Double Indirect Block pointer = 1

Disk block address = disk block entries size = 8 B

Disk Block size = 128 B

CALCULATION:

Number of entries in a block = $\frac{disk\; block\; size}{disk\; block\; address\; size} = \frac{128\; B}{8\;B}$ = 24

File size = (8 direct + 1 singel indirect + 1 double indirect) × Block size

File size = (8 × 1 + 1 × 24 + 1 × 24 × 24 ) × 128 B

File size = (210 B + 211 B + 215 B )

File size = (1 + 2 + 32)KB

The maximum size of file is 35 KB or 35 KBytes