誰かがこの問題を解決する方法を説明できますか?
1. **What is the maximum size of a file that could be handled by single indirect and double indirect?**
Block size is 2K
Address size is 4 Bytes
12 slots for direct disk blocks
One slot each for single indirect and double indirect.
_
2. **What is the maximum size of a file that could be handled by single indirect and double indirect?**
Block size is 4096 bytes can contain 1024 block references.
12 slots for direct disk blocks
One slot each for single indirect and double indirect.
私の試み:
1.
Block size is 2K = 2**11
Address size is 4 Bytes = 2**2
in one block are (2**11/2**2)= 2**9 pointers
12 slots for direct disk blocks
One slot each for single indirect = 2**9
and double indirect. = 2**18
Maximum file size
( 12 + 2**9 + 2**18 ) * 2**11 = 2**29 ~ 536 MB
_
2.
Block size is 4096 bytes can contain 1024 block references
12 slots for direct disk blocks
One slot each for single indirect = 1024 = 2**10
and double indirect. = 1024**2 = 2**20
Maximum file size
( 12 + 2**10 + 2**20 ) * 2**12 = 2**32
( 12 + 1024 + 1024**2 ) * 4096 = ~ 4GB
これが正しいのか、私がどこで間違っているのかはまだわかりません。
私のソースは次のとおりです。
- https://stackoverflow.com/questions/2742163/maximum-file-size-given-a-pspecial-inode-struct
-https://cis.temple.edu/~ingargio/cis307/readings/stable.html
-https://www.cs.swarthmore.edu/~kwebb/cs45/s18/09-File_Systems.pdf