CS FundamentalsVery hardGATE CS
A buddy allocator manages 1024 KB starting at address 0 and always uses the lowest-addressed free block of the needed size. Requests: A = 70 KB, B = 35 KB, C = 80 KB; then A is freed; then D = 60 KB is requested. At which address does D start?
- A. 0 KB
- B. 128 KB
- C. 384 KB
- D. 192 KB
Correct answer: D. 192 KB
A gets 128 KB at 0; B needs 64 KB, so the block at 128 splits into 128 (B) and 192 (free); C gets 128 KB at 256. Freeing A cannot merge (its buddy at 128 is split). D needs 64 KB, and the free 64 KB block at 192 is used.
More Operating Systems questions
- Periodic tasks (execution time, period = deadline): T1 (1, 4), T2 (2, 6), T3 (3, 12), scheduled by rate-monotonic priorities. Which…
- A Unix-style inode has 10 direct pointers, 1 single-indirect and 1 double-indirect pointer. Blocks are 1 KB and block pointers 4 bytes…
- Same inode (10 direct, 1 single-indirect, 1 double-indirect; 1 KB blocks; 256 pointers per block). The inode is already in memory and…
- A 2 GB partition uses a FAT with 4 KB clusters and 4-byte FAT entries. How large is one copy of the FAT?
- A TLB has 64 entries. What is its reach with 4 KB pages, and with 2 MB huge pages?
- A 32-bit system uses two-level paging with 4 KB pages and 4-byte entries (a 1024-entry outer table, each inner table mapping 4 MB). A…