275 views
1 votes
1 votes
Consider a filesystem in which an inode of a file contains pointers to $12$ direct blocks, one single indirect block, and one double indirect block. The block size in the system is $64$ bytes, and a block number (i.e., a pointer to a block) is $4$ bytes in size. You may assume that the single and double indirect blocks store only block numbers (pointers) and no other metadata. What is the maximum size of a file (in blocks) that can be stored in this filesystem?

1 Answer

3 votes
3 votes

Take a look at the I-node structure here : Inode Structure

Let,

  • Number of direct disk blocks be x. Given x = 12.
  • Number of singly indirect blocks be y. Given y = 1
  • Number of doubly indirect blocks be z. Given z = 1
  • Number of pointers that can be stored in 1 block be P.

The maximum file size in number of blocks

                    = x + (y × P) + (z × $P^{2}$)

 

edited by

Related questions

0 votes
0 votes
0 answers
3
0 votes
0 votes
0 answers
4
admin asked Nov 30, 2021
121 views
Kamala tosses $11$ fair coins and Rajani tosses $10$ fair coins. The probability that the number of heads obtained by Kamala is more than the number of tails obtained by ...