top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Describe the Buddy system of memory allocation?

0 votes
285 views
Describe the Buddy system of memory allocation?
posted Mar 31, 2016 by Jayshree

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Buddy system of memory allocation

Free memory is used to maintain in linked lists, each of similar sized blocks. Every block is of size 2^k. When some memory is needed by a thread, the block part of next higher order is selected, and divided into two. Note that the two such pieces different in address only in their kth bit. Such pieces are known as buddies. When any used part is freed, the OS examines to see if its buddy is also free. If so, it is reconnected, and sends into the original free-block linked-list.

enter image description here

answer Apr 2, 2016 by Shivaranjini
...