🎴 Flashcard Mode

Process and Memory Management

Card1 / 14
Mastered0
Review0
QuestionClick to flip

Consider a buddy system memory allocation where the size of a free memory segment is 256 KB, and the memory of kernel is 33 KB. To fulfill the request of memory allocation, a memory block of size M from free memory pool is allocated. What is the size of M?

AnswerClick to flip back
A
64 KB
💡 Explanation:

In buddy system, the memory is allocated in units sized as a power of 2, i.e. 4 KB, 16KB and so on. If the request is not of the appropriate size, it is rounded up to the next higher power of 2. In the given case, 256 KB of memory splits into two blocks of 128 KB each. It is further divided into two 64 KB blocks. 64 KB is the next higher size of power of 2, which can satisfy 33 KB of memory. So, this 64 KB block is allocated to the kernel.

Change Mode