Questions: Buddy System Memory Allocation

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

A process requests 70 KB of memory from a buddy allocator managing 512 KB total. How much memory is actually allocated to this process?

A70 KB — the buddy system allocates exactly the requested amount
B64 KB — the buddy system rounds down to the nearest power of two to save space
C128 KB — the buddy system rounds up to the next power of two that fits the request
D512 KB — the entire managed region is always allocated as a single block
Question 2 Multiple Choice

The buddy system can locate a freed block's buddy extremely quickly using:

AA linear scan through all free lists to find a block of matching size
BA single XOR operation on the block's starting address
CA hash table lookup keyed on block size
DTraversal of a binary search tree sorted by starting address
Question 3 True / False

The buddy system eliminates both internal and external fragmentation, making it the ideal general-purpose memory allocator.

TTrue
FFalse
Question 4 True / False

When a block is freed in the buddy system, the allocator checks whether its buddy is also free, merges them into a double-sized block, then checks whether that merged block's buddy is also free, continuing up the hierarchy.

TTrue
FFalse
Question 5 Short Answer

Why does the buddy system impose power-of-two block sizes, and what problem does this constraint create?

Think about your answer, then reveal below.