1,126 views
1 votes
1 votes
Consider the organisation of a UNIX file as represented by the inode. Assume that there are 12 block pointers and a singly,doubly and triply indirect pointer in each inode. Further assume that the system block size and the disk sector are both 8 KB. The disk pointer is 32 bits and maximum file size is 16 MB.

Assuming no information other than file inode is already in main memory,how many disk accesses are required to access the byte position 13423826 of the file?

(A) 1

(B) 2

(C) 4

(D) 8

2 Answers

0 votes
0 votes

No. of pointers in one block = $\frac{8KB}{4B}$ = 2K

Total size of file system = $\left ( 12 + 2K + 2K * 2K + 2K*2K*2K \right ) *8KB$  = 70403120791552 B $\approx$ $2^{46}B$

and $2^{46}$ > 13423826  so 1 disk access.

Option A.

0 votes
0 votes

like part c in this question direct pointers covers first 73728 bytes

the first indirect pointer covers next 16777216 bytes so given address 133423826 bytes comes into this range 

hence 2 block access will be required

first for indirect pointer block and second for required memory address in block

edited by

Related questions