in Operating System recategorized by
1,843 views
0 votes
0 votes

Suppose you have a Linux file system where the block size is $2K$ bytes, a disk address is $32$ bits, and an $i-$node contains the disk addresses of the first $12$ direct blocks of file, a single indirect block and a double indirect block. Approximately, what is the largest file that can be represented by an $i-$node?

  1. $513$ Kbytes
  2. $513$ MBytes
  3. $537$ Mbytes
  4. $537$ KBytes
in Operating System recategorized by
1.8k views

2 Answers

0 votes
0 votes

total size of file system= {no of direct dba + (db size/dba)+((db size/dba)^2+…..}*db size

0 votes
0 votes
  • Size of the disk block = 2048 Bytes

  • disk address = 32 bits = 4 Bytes

  • Number of addresses per block = 2048/4 = 512 = 2⁹

  • Maximum file size = 12 Direct Blocks + 1 indirect block + 1 double indirect block

  • = 12 + 2⁹ + 2⁹* 2⁹

  • = 12 + 2⁹ + 2¹⁸

  • The size of each block = 211 Bytes

  • Maximum size of the file = ( 12 + 2⁹ + 2¹⁸ ) × 2¹¹ Bytes

  • ∴ Maximum size of the file = 513.0234 ≈ 513 MBytes

by
Answer:

Related questions