* Exercise #1: - Question #1: If a block pointer uses 2^3 bytes, and a block is 2^10 bytes, then each block can hold 2^7 pointers Therefore, an i-node with oly the single-indirect can describe a file with 2^3 + 2^7 blocks - Question #2: If a block pointer uses 2^3 bytes, and a block is 2^10 bytes, then each block can hold 2^7 pointers Therefore, an i-node that uses all its pointers fully can describe a file with 2^3 + 2^7 + 2^14 + 2^21 blocks - Question #3: The file itself will use 33 blocks. The i-node is on one block. There needs to be an extra block for a single-indirect that will point to 33-8 = 25 blocks (no need for double indirect since with the single indirect we can address 2^7 blocks, way more than 25). Answer: 1 + 1 + 33 = 35 - Question #4: A 1GiB file needs 2^20 blocks Using the direct, single-, and double- indirect to their fullest, and assuming X is the block pointer size in byte, we have: 2^20 = 8 + (2^10 / X) + (2^10 / X) * (2^10 / X) where the first term is the number of blocks accessible via direct pointers the second term is the number of blocks accessible via single-indirect pointers the third term is the number of blocks accessible via double-indirect pointers The above equation can be rewritten as: 2^10 X^2 = 8 X^2 + X + 2^10 of 1016 X^2 - X - 1024 = 0 This is a second-degree equation with solution: X = 1.004.. which is just above 1 byte Therefore, pointers are 9 bits