in Operating System edited by
418 views
0 votes
0 votes
For disk size of $768 \hspace{0.1cm}MB$ and block size of $384 \hspace{0.1cm} bytes$ what would be the bitmap size in bytes(as a power of $2$)

iI represented $768 \hspace{0.1cm} MB$ as $3*2^{28}$ and $384$ as $3*2^7$ and then $\dfrac{3*2^{28}}{3*2^7}= 2^{21}$ but the correct answer given was not $2^{21}$ but $2^{18}$ because he divides $2^{21}/2^3$ and the explanation is $2^3$ is how many bits are in a byte, but why do this division isnt representing $768 \hspace{0.1cm} MB$ as $768*2^{20}$ or $3*2^{28}$ already in bytes, after all MB has $2^{20} \hspace{0.1cm} bytes$ so the answer $2^{21}$ should already be in bytes, right?
in Operating System edited by
by
418 views

1 comment

here they are asking about size of bitmap ,

you got total no of bits required to represent i.e 2^21

so size of  bit map is 2^21 bits and they want answer in bytes

and 1byte=8bits so 2^21/8 = 2^18 is the size of bitmap
0
0

3 Answers

0 votes
0 votes
i am getting  256KB

total number of bolck in File is  = 768MB / 384B

                                                        =  2 M  blocks

and each Block Need  1 bit in Bit map then total 2 M bit are needed to represent Bit Map in memory

memory for Bit map in Byte  = 2 M bit / 8 bit

                                                   =  256 KB
0 votes
0 votes
here they are asking about size of bitmap ,

you got total no of bits required to represent i.e 2^21

so size of  bit map is 2^21 bits and they want answer in bytes

and 1byte=8bits so 2^21/8 = 2^18 is the size of bitmap
0 votes
0 votes
This ans will not be in Bytes, Because when you will divide Block size by block size, the ans will be (x Bytes)/(y Bytes). Here Bytes/Bytes cancelled hence answer will not have any unit. Neither Bytes nor Bits it will be just a number.