00:01
In a buddy system memory allocator, memory is allocated and divided into blocks that are powers of 2.
00:06
So, when a process requests memory, it is allocated the smallest available block that can be accommodated to request.
00:12
So, here is the sequence for memory allocation.
00:15
A is plus 59 kib, b is plus 27, c is plus 44, d is plus 115, e is plus 28 and f is plus 98.
00:27
So, the initial free memory is 512 kb and after the above allocation, let's look at the binary tree.
00:35
So, in this you have to look at that tree.
00:39
Now, after the b part of the discussion, here we have to calculate the overall internal fragmentation.
00:45
So, you will need to find how much memory is unused due to allocation of larger blocks than requested.
00:51
So, in this case, it's a difference between the size of allocated block and the requested size for each allocation.
00:58
So, a internal fragmentation is 128 minus 59 which is 69 kb and so on.
01:04
B for 37, c for 20, d for 13, e for 36 and f for 30.
01:10
Now, add up all the internal fragmentation...