Which of the following are TRUE about the Buddy System memory allocation? (Select all that apply)
📖 Explanation
A: TRUE - Buddy system only allocates blocks in sizes that are powers of 2 (32, 64, 128, ...). Requests are rounded up to the next power of 2.
B: TRUE - For a block of size 2^k at address x, the buddy's address = x XOR 2^k. This is because buddies are pairs that together form an aligned block of size 2^(k+1). Example: block at 0 of size 64 → buddy at 64 (0 XOR 64 = 64). Block at 64 of size 64 → buddy at 0 (64 XOR 64 = 0).
C: FALSE - Buddy system reduces but does NOT eliminate external fragmentation. Fragmentation still occurs because blocks must be power-of-2 sized and coalescing requires both buddies to be free.
D: TRUE - A request for 33 bytes gets a 64-byte block → 31 bytes wasted = internal fragmentation. This is the main drawback.
E: TRUE - Finding the buddy is O(1) via XOR, unlike general free lists which may require scanning.