CS FundamentalsVery hardProduct company interview · GATE level
An inode has 10 direct pointers, one single-indirect, one double-indirect and one triple-indirect pointer. Blocks are 2 KB and block pointers are 8 bytes. What is the largest possible file size, to the nearest hundredth of a GiB?
- A. About 256.50 GiB
- B. About 32.13 GiB
- C. About 64.25 GiB
- D. About 0.13 GiB
Correct answer: B. About 32.13 GiB
One block holds 2048/8 = 256 pointers. Data blocks reachable: 10 + 256 + 256^2 + 256^3 = 10 + 256 + 65,536 + 16,777,216 = 16,843,018. Times 2 KB = 34,494,500,864 bytes, about 32.13 GiB, almost all of it through the triple-indirect pointer. 256.50 GiB assumes 4-byte pointers (512 per block); 0.13 GiB stops at the double-indirect level; 64.25 GiB multiplies 256 pointers per block by a 4 KB data block, mixing two block sizes.
More Operating Systems questions
- A Unix-style inode has 12 direct pointers plus single-, double- and triple-indirect pointers; blocks are 4 KB and pointers 4 bytes. With…
- Each process in a system spends 70% of its time waiting for I/O, independently of the others. Using the model CPU utilisation = 1 - p^n…
- Round Robin is used with a quantum of 4 ms and a context-switch time of 1 ms. There are always 10 CPU-bound processes ready and none does…
- A TLB has 64 entries. With 4 KB pages, what is its reach (the memory it can map without a miss)? If 16 of the entries instead map 2 MB…
- Processes (arrival, burst) in ms: P1 (0, 10), P2 (1, 6), P3 (3, 2), P4 (5, 4), P5 (6, 1). Under preemptive SJF (SRTF), what is the average…
- Processes (arrival, burst) in ms: A (2, 6), B (3, 2), C (4, 1), D (12, 3), E (13, 2). The CPU is idle until the first arrival. Under…