retagged by
3,931 views
2 votes
2 votes
A $1$TB Disk with $4$-KB blocks require $32$MB to store its bit map?

Kindly explain how.
retagged by

4 Answers

Best answer
8 votes
8 votes
For OS numericals, conversion of memory size in terms of 2 powers is very important

So Disk size = 1TB = 2^40 B

Block Size = 4KB =2^12 B

No of blocks = (2^40 ) / ( 2^12) = 2^28 blocks

Now for each block to represent in bit map we will require 1 bit so bitmap size in bits = 2^28 bits (to represent 2^28 blocks)

So bitmap size in Bytes = 2^28 / 2^3 =2^25 = 32 MB

P.S Thanks @Harish Kumar you gave me more clarification on this question
edited by
1 votes
1 votes

https://gateoverflow.in/12059/ugcnet-dec2013-ii-49

Divide Disk Size by the no of blocks. Yeah. :)

The above link carries a similar question to d one u asked. Yeah. As I've worked out, 1 TB equals 220 MB. 

And d size of Blocks is 4 KB. 

So as per formula, 220 MB/4KB for simplicity sake , yeah. This is how d calculation  goes. Only I am not able to understand tat d above calculation shud evaluate to 32 MB. If someone can kindly work it out the solution will definitely be 32. 

0 votes
0 votes

$1 $ TB $=2^{40} \\$

$4$ KB $=2^{12}$

$1$ Byte = $2^3=8$bits

The complete disk is collection of blocks.


$\therefore $ No of blocks in Disk $=$ $\Large \frac{Total \ size \ of \ disk}{size \ of \ one \ block}  $

$=\Large \frac{2^{40}}{2^{12}}$ $=2^{28} \ Blocks$

No of bits to be store = No of blocks = $2^{28}  $ bits $=$ $\Large  \frac{2^{28}}{2^3}$ $=2^{25}$Bytes $ =32$ MegaBytes

0 votes
0 votes
I am getting  32MB

total number of bolck in File is  =  1TB/4KB

                                                        =  256 M block

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

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

                                                   =  32MB

Related questions

4 votes
4 votes
3 answers
1
Shivangi Parashar 2 asked Nov 27, 2018
5,530 views
A bit-map can be used to keep track of which blocks are free in a file-system’s partition on disk.Assuming, 1 KB block size and a disk size of 40 GB, what is the size o...
0 votes
0 votes
3 answers
2
anonymous asked Jun 17, 2018
396 views
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 votes
0 votes
2 answers
3
2 votes
2 votes
2 answers
4
pC asked Dec 12, 2015
5,138 views
For a Hard disk of Capacity 20 MB . Disk block address of 16 bits and disk block size of 1 KB . The number of disk blocks required to store all the Free Blocks using Bitm...