CS FundamentalsHardGATE CS · Advanced
A file system has 1 KB blocks and 4-byte block pointers; the inode (already in memory) holds 12 direct pointers and one single-, one double- and one triple-indirect pointer. There is no block cache. How many disk block reads are needed to read the logical blocks 5, 100, 30000 and 70000 (numbered from 0) one after the other, each by itself from the inode?
- A. 14
- B. 11
- C. 10
- D. 9
Correct answer: C. 10
With 256 pointers per block: block 5 is direct (1 read), 100 is in the single-indirect range 12-267 (2 reads), 30000 lies in the double-indirect range 268-65803 (3 reads), 70000 is beyond that, so triple-indirect (4 reads). Total 10. Counting the inode read for each block would add 4.
More Operating Systems questions
- Three periodic tasks (C, T) with deadline equal to period, all released at t = 0, are: (1, 4), (4, 9), (4, 15). Their total utilisation is…
- Four processes with CPU bursts 5, 3, 8 and 2 ms arrive at time 0 in that order and are scheduled by FCFS. What is the average waiting time?
- Processes with bursts 6, 8, 7 and 3 ms all arrive at time 0 and are scheduled by non-preemptive SJF. What is the average waiting time?
- How many page faults occur under FIFO replacement with 3 frames (initially empty) for the reference string 2, 3, 2, 1, 5, 2, 4, 5, 3, 2…
- How many page faults occur under LRU replacement with 3 frames (initially empty) for the reference string 7, 0, 1, 2, 0, 3, 0, 4, 2, 3, 0…
- A memory access takes 100 ns and a TLB lookup takes 10 ns. With a TLB hit ratio of 90% and a single-level page table in memory, what is…