Tuesday, 6 August 2013

Calculating blocks needed to access file's inode.

Calculating blocks needed to access file's inode.

A UNIX inode has 13 block pointers. Let the first ten be direct pointers
and the other three be single, double and triple indirect pointers
respectively. Furthermore, let disk blocks be 512 bytes in size and block
pointyers are 4 bytes. Suppose we need to read a file in subdirectory
/home/smith/cs123/. Only directory /home is in memory and everything else
is not in memory. Also supposed each directory can fit in one data block.
How many blocks are needed to access this file's inode? What are these
blocks?
After get this file's inode, how many blocks are needed to access to read
the first 10kb in this file.

No comments:

Post a Comment