CS FundamentalsModerateGATE CS (PYQ pattern)
A 2^40-byte disk uses 4 KB blocks. Free space can be tracked either by a bitmap (1 bit per block) or by a plain list of free block numbers, each stored as a 32-bit integer. Below what percentage of free blocks does the list occupy less space than the bitmap?
- A. 3.125%
- B. 12.5%
- C. 25%
- D. 0.39%
Correct answer: A. 3.125%
Blocks = 2^40 / 2^12 = 2^28, so the bitmap is 2^28 bits = 32 MB. The list costs 32 bits per free block; it is smaller when 32F < 2^28, i.e. F < 2^23 blocks = 1/32 = 3.125% of the disk. 12.5% treats an entry as 8 bits, 25% as 4 bits, and 0.39% (1/256) mixes bytes and bits.
More Operating Systems questions
- A 10,000 RPM disk has an average seek time of 5 ms and a sustained transfer rate of 100 MB/s (1 MB = 10^6 bytes). It serves a stream of…
- A one-slot buffer uses semaphores mutex = 1, empty = 1, full = 0. The producer runs twice: wait(mutex); wait(empty); print p…
- Five processes with CPU bursts 5, 12, 3, 9 and 7 ms all arrive at time 0 in that order. Context switches are free. Among the quanta 2, 4…
- A 32-bit machine uses two-level paging with 10 + 10 + 12 address bits. For the running process, root-table entries 3 and 0x2FF are valid…
- Assume every fork() succeeds and output is not lost or duplicated. int x = 1; int main(void) { int p = &x; if (fork() == 0) { p += 2; if…
- Three periodic tasks (execution time, period = relative deadline), all released at t = 0: T1 (2, 6), T2 (3, 8), T3 (3, 12). They are…