Unix样式的i节点具有10个直接指针和一个单,一个双和一个三重间接指针。磁盘块大小为1 KB,磁盘块地址为32位,并使用48位整数。可能的最大文件大小是多少?
(A) 2 24字节
(B) 2 32字节
(C) 2 34字节
(D) 2 48字节答案: (C)
解释:
图片来源:Wiki
Size of Disk Block = 1Kbyte
Disk Blocks address = 32bits,
but 48 bit integers are used for address
Therefore address size = 6 bytes
No of addresses per block = 1024/6 = 170.66
Therefore 170 ≈ 2^8 addresses per block can be stored
Maximum File Size = 10 Direct + 1 Single Indirect +
1 Double Indirect + 1 Triple Indirect
= 10 + 28 + 28*28 + 28*28*28
≈ 224 Blocks
Since each block is of size 210
Maximum files size = 224 * 210
= 234
这个问题的测验