누군가 이 문제를 해결하는 방법을 설명해 줄 수 있나요?
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