This is a question about OS file storage management and Inode
This is a question about OS file storage management and Inode. This is a question for review of final exam..Lecturer didn't give the answer about second question. Does anybody can 开发者_如何学Pythondo this and help me or give some hints? THnaks!
- [10 points] File Storage Management and Inode b) Consider the organization of an Unix file a represented by Inode. Assume that there 10 direct block pointers, and a singly, doubly and triply indirect pointers in each Inode. Assume that the system block size is 4K. Disk block pointer is 4 bytes. i. What is the maximum file size supported by the system? ii. Assuming no information other than the file Inode is in the main memory, how many disk accesses are required to access the byte in position 54, 423,956.
10 block pointers = 10 4K blocks = 40KB
singly indirect: 1 block full of pointers = 4K / 4 pointers = 1024 pointers = 4MB
double indirect: 1 block of pointers = 1024 single indirects = 4GB
triple indirect: 1 block of pointers = 1024 double indirects = 4TB
total max size= 4TB+4GB+4MB+40KB = 4402345713664 bytes
position 54,423,956 is in one of the double indirect blocks, so it has to read the two steps and the data block => 3 random blocks read
精彩评论