In this system, memory is only allocated in units that are powers of two. So if 3 bytes are requested you get 4, and if 1030 KB are requested you get 2048 KB. This does lead to wasted space (internal fragmentation).
Program P (1030 KB). It is necessary to allocate a memory of 2048 KB (2n, n=11)
Program Q (520 KB). It is necessary to allocate a memory of 1024 KB (2 n, n=10)
Program R (70 KB). It is necessary to allocate a memory of 128 KB (2 n, n=7)
Program S (103 KB). It is necessary to allocate a memory of 256 KB (2 n, n=8)
To place P, Q, R, and S programs you need 1723 KB:
P (1030 KB)+ Q (520 KB) + R (70 KB) + S (103 KB) = 1723 KB
If the physical memory of size 2128KB is managed by buddies’ scheme, then a set of four programs, namely P, Q, R and S, requires 3456 KB:
P (2048 KB)+ Q (1024 KB) + R (128 KB) + S (256 KB) = 3456 KB
If the physical memory has a size of 2128 KB, which is managed by buddies’ scheme, then only Q, R and S programs can be placed in it. For a P program of 1030 KB, there will not be enough memory space. This is unfair.
Comments
Leave a comment