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?
- A. 8
- B. 7
- C. 9
- 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
- A disk has 16 surfaces, 512 cylinders and 64 sectors per track. Sectors are numbered starting at 0, fastest over sectors, then surfaces…
- A disk has 8 platters (both surfaces used), 20,000 tracks per surface, 400 sectors per track on average and 512-byte sectors. What is its…
- Which of the following events causes a process to move from RUNNING to READY (not to WAITING)?
- How many of these transitions are possible in the standard five-state model (new, ready, running, waiting, terminated)? 1. waiting →…
- Which of these does a context switch between two threads of the SAME process need NOT change, but a switch between two different processes…
- Which items are shared by all threads of one process? 1. Heap 2. Stack 3. Open file descriptors 4. Program counter 5. Global variables