How many disk operations are needed to fetch the inode for t

How many disk operations are needed to fetch the i-node for the file /dir1/dir2/dir3/myfile? Assume that the i-node for the root directory is in memory, but nothing else along the path is in memory. Also assume that all directories fit in one disk block.

Solution

Since the inode of root is in memory, the following disk operations will happen:

1. Fetch the content of / directory

2. Fetch the inode of dir1

3. Fetch /dir1 directory

4. Fetch the inode of dir2

5. Fetch the /dir1/dir2 directory

6. Fetch the inode for dir3

7. Fetch the /dir1/dir2/dir3 directory

8. Fetch the inode of myfile

Total 8 disk operations.

How many disk operations are needed to fetch the i-node for the file /dir1/dir2/dir3/myfile? Assume that the i-node for the root directory is in memory, but not

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site