The buddy algorithm is:
The buddy for any block of size $2^k$ is another block of the same size, and with the same page frame number except that the
kthbit is reversed.
If the block size if $2^3$ and the start page frame number(aka
pfn) of this block is
0xC, the page frame number of the buddy of this block is
This algorithm is very ingenious but I have two questions.
- Why the buddy of
- Why reversing the
kthbit does the trick?