CS FundamentalsVery hardGATE CS

Path /usr/local/bin/tool is opened on a Unix file system where every directory fits in one block, no inode or block is cached except the root inode, and each inode read and each block read costs one disk access. How many disk accesses are needed to bring tool's inode into memory?

  1. A. 8
  2. B. 7
  3. C. 9
  4. D. 4

Correct answer: A. 8

With the root inode cached: root directory block, usr inode, usr block, local inode, local block, bin inode, bin block, and finally tool's inode = 8 accesses. Forgetting the final inode gives 7; re-reading the cached root inode gives 9.

More Operating Systems questions

Exams that ask this topic