Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider a file system of the figure below with - 12 direct disk blocks, plus si

ID: 3643264 • Letter: C

Question

Consider a file system of the figure below with

- 12 direct disk blocks, plus single and double indirect disk blocks.

- S1 is the size of the blocks in the first level (direct blocks), S2 the size of the block in the second level (single) and S3 is the size of the block in the third level (double)

- A pointer to a disk block requires 4 bytes.


1- What is the maximum size of a file that can be stored in this file system?(10 pt)

2- Assuming a header of 256 Bytes, compute the overhead need to store a file (5 pt)

Explanation / Answer

Please rate

a) Since there are 12 direct blocks (0-11) => 12 x s1
There is one indirect block which points to block having 14 (0-13) blocks each of size s2 => 14 x s2
There is one double indirect block => 14 x 14 x s3

Therefore maximum size of a file can be = ( 12 x s1 ) + ( 14 x s2 ) + ( 14 x 14 x x s3).

b) The header occupies 256 bytes.
Each of the pointers in direct blocks occupy = 12 x 4 bytes.
Total space occupied by pointers and header for 1st indirect block = 14 x 4 bytes + 256 bytes + 4 bytes
Total space occupied by pointers and headers for 2nd indirect block = 14 x ( ( 14 x 4 ) + 256 ) + 4 bytes

Therefore total overhead = 256 + 48 + 316 + 4372 = 4992 bytes

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote