17 category 3 560 chapter 10 virtual memory develop a

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ocate a block of size ¾ , we find the first available block of size ¾ , such that Ñ. If , then we are done. Otherwise we recursively split the block in half until . As we perform this splitting, each remaining half (known as a buddy), is placed on the appropriate free list. To free a block of size ¾ , we continue coalescing with the free. When we encounter a allocated buddy, we stop the coalescing. A key fact about buddy systems is that given the address and size of a block, it is easy to compute the address of its buddy. For example, a block of size 32 byes with address xxx...x00000 has its buddy at address xxx...x10000 In other words, the addresses of a block and its buddy differ in exactly one bit position. The major advantage of a buddy system allocator is its fast searching and coalescing. The major disadvantage is that the power-of-two requirement on the block size can cause significant internal fragmentation. For this reason, buddy system allocators are not appropriate for general-purpose workloads. However, for certain application-specific workloads, where...
View Full Document

Ask a homework question - tutors are online