CS FundamentalsVery hardGATE CS
A 1024 KB buddy system (minimum block 32 KB, lowest-address-first allocation) serves A=70 KB, B=35 KB, C=80 KB, D=60 KB in that order, getting blocks of 128, 64, 128 and 64 KB. Then A, B and D are freed in this order while C stays allocated. Immediately afterwards, which statement is true?
- A. There are 3 free blocks and the largest is 512 KB
- B. There are 3 free blocks and the largest is 256 KB
- C. There are 4 free blocks and the largest is 512 KB
- D. There is 1 free block of 896 KB
Correct answer: A. There are 3 free blocks and the largest is 512 KB
After the four allocations the free blocks are 512 and 128. A frees 128 (its buddy is split, no merge). B frees 64 whose buddy D is busy. D then frees 64, merges with B's 64 into 128, merges with A's 128 into 256, but its buddy 256 contains C. Free blocks: 512, 128 and 256, so 3 blocks, largest 512 KB.
More Operating Systems questions
- A system uses the clock (second-chance) page replacement with 4 frames. Initially all frames are empty; a page has its reference bit set…
- Memory access takes 200 ns. A page fault on a clean victim takes 8 ms to service and on a dirty victim 20 ms; 40% of victims are dirty…
- A system has 48-bit virtual addresses, 8 KB pages and 16 GB of physical memory. An inverted page table has one entry per frame, holding a…
- A FAT file system on a 2 TB partition uses 8 KB blocks. Each FAT entry holds a block number plus 4 control bits and entries are rounded up…
- A Unix-style inode has 10 direct pointers and one single, one double and one triple indirect pointer. Blocks are 2 KB and pointers are 4…
- A 32-bit machine uses two-level paging with 4 KB pages and 4-byte entries (10+10+12 split). A process has 6 MB of code and data starting…