A file system with 300 GByte disk uses a file descriptor with 8 direct...
Total number of possible addresses stored in a disk block = 128/8 = 16
Maximum number of addressable bytes due to direct address block = 8*128
Maximum number of addressable bytes due to 1 single indirect address block = 16*128
Maximum number of addressable bytes due to 1 double indirect address block = 16*16*128
The maximum possible file size = 8*128 + 16*128 + 16*16*128 = 35KB
View all questions of this test
A file system with 300 GByte disk uses a file descriptor with 8 direct...
Given Data:
- Disk size: 300 GByte
- Size of each disk block: 128 Bytes
- Size of each disk block address: 8 Bytes
- File descriptor:
- 8 direct block addresses
- 1 indirect block address
- 1 doubly indirect block address
Calculating the maximum file size:
To calculate the maximum file size, we need to consider the maximum number of disk blocks that can be addressed by the file descriptor.
Direct Blocks:
The file descriptor has 8 direct block addresses, and each address can point to a disk block. Therefore, the maximum number of direct blocks that can be addressed is 8.
Indirect Blocks:
The file descriptor has 1 indirect block address, which can point to a block containing disk block addresses. Since each disk block address is 8 Bytes, the size of each indirect block is 8 * 128 Bytes = 1024 Bytes. Therefore, the maximum number of disk blocks that can be addressed by the indirect block is 1024 / 8 = 128.
Doubly Indirect Blocks:
The file descriptor has 1 doubly indirect block address, which can point to a block containing indirect block addresses. Since each indirect block can address 128 disk blocks, the size of each doubly indirect block is 128 * 8 Bytes = 1024 Bytes. Therefore, the maximum number of disk blocks that can be addressed by the doubly indirect block is 1024 / 8 = 128.
Total Number of Addressable Disk Blocks:
The total number of addressable disk blocks is the sum of the direct blocks, the indirect blocks, and the doubly indirect blocks. Therefore, the maximum number of addressable disk blocks is 8 (direct blocks) + 128 (indirect blocks) + (128 * 128) (doubly indirect blocks) = 16512.
Maximum File Size:
Since each disk block is 128 Bytes in size, the maximum file size can be calculated by multiplying the number of addressable disk blocks by the size of each disk block. Therefore, the maximum file size is 16512 (number of addressable disk blocks) * 128 (size of each disk block) = 2,110,976 Bytes.
Converting the file size to KBytes: 2,110,976 Bytes / 1024 = 2064 KBytes.
Therefore, the maximum possible file size in this file system is 2064 Kbytes, which is closest to option 'B' (35 Kbytes).
To make sure you are not studying endlessly, EduRev has designed Computer Science Engineering (CSE) study material, with Structured Courses, Videos, & Test Series. Plus get personalized analysis, doubt solving and improvement plans to achieve a great score in Computer Science Engineering (CSE).