CS FundamentalsVery hardGATE CS
A Unix-style inode has 12 direct pointers, one single-indirect and one double-indirect pointer; blocks are 4 KB and block pointers 4 bytes. How many disk blocks in total (data plus index blocks) does a 5 MB file occupy?
- A. 1280
- B. 1281
- C. 1283
- D. 1282
Correct answer: C. 1283
5 MB / 4 KB = 1280 data blocks. 12 are direct, the single-indirect block covers 1024 more (1036 so far), and the last 244 need the double-indirect block plus one second-level block. Index blocks = 1 + 2 = 3, so 1283 in all.
More Operating Systems questions
- Six 4 TB disks are to be combined. Which layout survives ANY two simultaneous disk failures, and what usable capacity does it give?
- A 1 MB region uses the buddy system. Requests arrive for A = 70 KB, B = 35 KB and C = 80 KB. What is the total internal fragmentation, and…
- Free holes, in address order, are 150, 400, 250, 600 and 300 KB. Requests for 280, 200, 350 and 290 KB arrive in that order. Which…
- A segment table has: segment 0 base 1200, limit 500; segment 1 base 3000, limit 150; segment 2 base 800, limit 300. Which logical address…
- A process with 100 private writable pages calls fork() and the system uses copy-on-write; a page is copied only if it is still shared when…
- Three periodic tasks with deadline = period have (C, T) = (1, 4), (2, 6) and (3, 12), scheduled by rate-monotonic priority. Which…