CS FundamentalsHardGATE CS · Advanced
A file system uses 2 KB blocks and 4-byte block pointers. Each inode has 12 direct pointers plus one single-, one double- and one triple-indirect pointer. What is the maximum file size that the inode structure can address (1 GiB = 2^30 bytes)?
- A. about 0.50 GiB
- B. about 256.00 GiB
- C. about 256.50 GiB
- D. about 513.00 GiB
Correct answer: C. about 256.50 GiB
Pointers per block = 2048/4 = 512, so the blocks addressed are 12 + 512 + 512^2 + 512^3 = 134480396, times 2 KB gives about 256.50 GiB. Leaving out the triple level gives only 0.50 GiB.
More Operating Systems questions
- A 32-bit machine uses two-level paging with 4 KB pages and 4-byte entries (10 bits for the top level, 10 for the second level, 12 for the…
- A paged system has a 10 ns TLB lookup and 100 ns per memory access, with a 95% TLB hit ratio. A TLB miss costs a two-level page-table…
- A semaphore s is initialised to 0. Three threads run concurrently, and print(X) prints the single letter X atomically. Thread 1: print(A)…
- Two threads share an integer x initialised to 0. Thread 1 executes the loop body x = x + 1 three times; Thread 2 executes it twice. Each…
- Four periodic tasks (computation time C, period T = relative deadline), all released at t = 0, are scheduled by preemptive rate-monotonic…
- A disk spins at 7200 rpm with 500 sectors per track and an average seek time of 5 ms. The controller adds 0.2 ms of overhead. What is the…