• edited by
593 views
1 1 vote
Bit map is used to keep track of free spaces.assumimg 1KB block size and disk sze 40GB..the size of bitmap has to be _______ (in MB)

3 Answers

Best answer
2 2 votes

In bitmap approah one bit is used to represent one block..

No of blocks =  Disk Capacity / Disk Block Size

                   =  40 * 230 / 210

                   =  40 M blocks

So no of bits required  =  40 M bits

                                 =  5 MB

Hence the size of bitmap required  =  5 MB

• selected by
1 1 vote

No. of blocks in the disk $= \frac{disk\_size}{block\_size} = \frac{40 \times 2^{30}}{2^{10}} = 40 \times 2^{20}$ Blocks

In bitmap method each block requires 1 bit to represent each block (zero indicates block is free and 1 indicate block is used)

therefore, we req. $40 \times 2^{20}$ bits $= \frac{40 \times 2^{20}}{8} $ Bytes = $5 \times 2^{20}$ Bytes = 5MB

Link to ref. https://en.wikipedia.org/wiki/Free_space_bitmap

1 1 vote

The free-space list is implemented as a Bit map in which Each block is represented by 1 bit. If the block is free, the bit is 1; if the block is allocated, the bit is 0.

here block size is 1KB.

 Edit: got confused block size with number of blocks.

so number of blocks here= 40GB/1KB

                                        = 40 M blocks

and 1 block requires 1 bit

so 40 M block requires 40 M bit= 5 MB.

• edited by
Position:
Show:

No related questions found