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

Consider UNIX i-node file system. Assume that there are 12 direct pointers, one

ID: 3721038 • Letter: C

Question

Consider UNIX i-node file system. Assume that there are 12 direct pointers, one single-indirect, one double-indirect, and one triple indirect pointer. Also assume that the hard drive is formatted by 1024 byte sectors (the size of the i-node disk block is 1024 bytes). If each disk block pointer is 32 bits, how many disk access(es) is (are) needed to access (read) the data (onebvte data) at 4,518,880 bytes from the beginning of a file? Assume that this file is never accessed before and no information about this file (ie., j-nodes) is loaded to the main memory. Only the directory that contains this file is loaded to the main memory. Show all your work. Showing the correct number of disk accesses) is worth 10% of the credit, while showing a correct procedure to find the number is worth 90% of the credit.

Explanation / Answer

According to UNIX inode file system

Maximum number of bytes addressed by 12 direct pointers is

= Number of direct pointers * Blocksize
= 12 * 1Kb
= 12Kb

Maximum number of bytes addressed by single indirect pointer is

= NumberOfEntries * BlockSize
= (Blocksize / BlockNumberSize) * BlockSize
= (1Kb / 4b) * 1Kb
= 256 * 1Kb
= 256Kb

Maximum number of bytes addressed by double indirect pointer is

= NumberOfEntries^2 * BlockSize
= (Blocksize / BlockNumberSize)^2 * BlockSize
= (1Kb / 4b)^2 * 1Kb
= (2^10 / 2^2)^2 * (2^10b)
= (2^8)^2 * (2^10)b
= (2^16) * (2^10)b
= 2^6 * 2^20 b
= 64 Mb

Maximum number of bytes addressed by triple indirect pointer is

= NumberOfEntries^3 * BlockSize
= (Blocksize / BlockNumberSize)^3 * BlockSize
= (1Kb / 4b)^3 * 1Kb
= (2^10 / 2^2)^3 * (2^10b)
= (2^8)^3 * (2^10)b
= (2^24) * (2^10)b
= 2^4 * 2^30 b
= 16 Gb

complete size = 4518880 * ( sum of all)

4518880 *(12kb +256kb+16gb+64mb)

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