In: Computer Science
Assume that the maximum capacity of a file system space is 8TB (1TB = 240 bytes), and the disk block size is 2KB. The file control block (FCB) contains an index table of 512 bytes. Answer the following questions:
(1) [4 MARKS] Suppose that the index table only adopts the direct index structure, and stores the disk block numbers occupied by the file. How many bytes are required for each index table entry to represent a disk block number? What is the maximum length of a single file that can be supported by this scheme?
Answer 1:
File system capacity = bytes = bytes
Disk block size = KB = bytes = bytes
Total number of blocks = (File system capacity) / (Disk block size)
To address
blocks, 32 bits i.e., 4 bytes are required.
Therefore, the index table entry size = 4
bytes
Number of entries in the index table = (Index table size) / (Index table entry size) = 512 / 4 = 128
Since each entry in the index table points to a block
number.
Therefore, the maximum length of a single file = (Number of entries
in the index table) * (disk block size) = 128 * 2 KB = 256
KB
Question: How many bytes are required for each index table entry to represent a disk block number?
Answer: 4 bytes
Question: What is the maximum length of a single file that can be supported by this scheme?
Answer: 256 KB
Kindly rate the answer and for any help just drop a comment