Uploaded by Kaushal Mewar

Buddy algorithm

advertisement
A system has 512 KBs of unallocated memory. The following memory allocation requests are
made (in order) using the buddy memory allocation algorithm: 10 KBs, 50 KBs, 65 KBs, 25 KBs.
Draw a tree diagram of the memory layout after each memory allocation request.
After the first request of 10 KBs, the memory layout would look like this:
After the second request of 50 KBs, the memory layout would look like this:
After the third request of 65 KBs, the memory layout would look like this:
Note that the buddy algorithm will have to split the 50 KB block into two 25 KB blocks to satisfy
this request.
After the fourth request of 25 KBs, the memory layout would look like this:
Note that the buddy algorithm will have to split the 50 KB block into two 25 KB blocks to satisfy
this request.
Download