1,666 views
1 1 vote
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 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 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
Position:
Show:

Related questions

1 1 vote
1 answers 1 answer
1.2k
1.2k views
Sammohan Ganguly asked Aug 10, 2018
1,160 views
Each I-node in file system has 5-direct pointers to disk blocks, 3 single indirect pointers to disk blocks, 2 double indirect pointers to disk blocks and nothing else. A ...
6 6 votes
2 2 answers
265
265 views
GO Classes asked Aug 31
265 views
Which of the following data structures can be used by a file system to manage free disk blocks?Bitmap Inode Free-block linked list File Allocation Table, FAT I and II onl...