78 views
If the memory is 768 MB and the block’s size is 384 Bytes, what will be the size of the bitmap in Bytes?

I think it should be 2^21 Bytes, but I’m not quite sure.

Could you show me also your solution?
| 78 views

Bit map or Bit Vector is used for keeping track of all those blocks which are free. A bit is stored for each block, if the bit value is '0', that indicates that the block is allocated to some process. If the bit value is '1', it means that the block is allocated to some process.

Here in your problem we can see that no.of blocks =768MB/384B= 2^21 blocks. If we are setting 1 bit for 1 block, then it will be 2^21 bits, so it will be 2^18 Bytes, that will be equal to 256KB.
by (425 points)

I bitmap is used to keep track of blocks which are occupied and not occupied blocks (Holes),

for the entire memory we create an array. And the size of array depends on the number of blocks that are present in the Main memory, since for every block we are maintaining 1 bit.

so, 768MB/384B=2^21 bits.....

now convert 2^21 bits to the standard bytes system....you will get around 256 KB.....

by Active (1.2k points)

+1 vote