CS FundamentalsEasyGATE CS
A Unix-style inode has 10 direct pointers and one single, one double and one triple indirect pointer. Blocks are 2 KB and pointers are 4 bytes. The inode is in memory and nothing else is cached. How many disk block reads are needed to read the byte at file offset 600 000 000?
- A. 3
- B. 4
- C. 5
- D. 6
Correct answer: B. 4
Block index = 600 000 000/2048 = 292 968. Direct, single and double indirect cover 10+512+262 144 = 262 666 blocks, so the block is reached through the triple indirect pointer: 3 pointer blocks plus the data block = 4 reads.
More Operating Systems questions
- A 32-bit machine uses two-level paging with 4 KB pages and 4-byte entries (10+10+12 split). A process has 6 MB of code and data starting…
- A machine has 46-bit virtual addresses, 16 KB pages, 40-bit physical addresses, and each page-table entry holds the frame number plus 6…
- A parent has 1000 pages mapped copy-on-write after fork, all initially shared. The child then writes to 100 distinct pages, and afterwards…
- A bounded-buffer monitor with Mesa-style signalling uses: get() { if (count == 0) wait(notEmpty); item = buf[out]; count--; ... } and…
- A three-level feedback queue: Q0 (quantum 2), Q1 (quantum 4), Q2 (FCFS). New processes join Q0 and preempt lower queues; a process that…
- The reference string of a process is 1 2 1 3 4 4 5 2 3 2 2 6 7 7 6 1. Using a working-set window of the last 5 references (including the…