retagged by
6,643 views
1 votes
1 votes

How much space will be required to store the bit map of a 1.3 GB disk with 512 bytes block size?

  1. 332.8 KB
  2. 83.6 KB
  3. 266.2 KB
  4. 256.6 KB
retagged by

6 Answers

Best answer
2 votes
2 votes

We need a bit for each block. Number of blocks = disk size/ block size

= 1.3 GB / 512 B 

This will give the size of bit map in bits. To get the byte size divide by 8 and we get 332.8 KB. For disk size, GB is taken as 1024*1024*1024 bytes and for KB it is 1024 bytes. 

Ref: https://en.wikipedia.org/wiki/Gigabyte

selected by
6 votes
6 votes

In the Bitmap, I bit is required to store the information about the block. If the block is in use then its set as 1 else it set as 0. 

Given that, Total Memory = 1.3 GB = (1.3*2^27) bytes

Block size = 512 Byte = (2^9) bytes

Number of Block = (1.3*(2^27))/(2^9) = (1.3*(2^18))

We need (1.3*(2^18)) bit to store all the information about bitmap, 

Hence size of Bitmap = (1.3*(2^18)) bit = 1.3*256 KB = 332.8 KB

4 votes
4 votes
for bitmap representation 1 bit is required for each blocks

so #of block=disk size/block size

                 =1.3GB/512 B

                  =1.3*2^30B/512B

                 =1.3*2^30/2^9

                 =1.3*2^21=1.3*2*2^20=2.6M BLOCKS

FOR BITMAP METHOD SIZE REQUIRED =2.6M bits
3 votes
3 votes

In the given question it is given that, block size $= 2^9$ Bytes

Disk size # $=1.3 \ GB = 1.3*2^{30}$ Bytes

Therefore, total no. of blocks in the disk $=1.3*2^{30}/2^9=1.3 * 2^{21}$ 

Now, here is the catch:

In bit-map for every block there is one bit associated with that block.

So, the space required to for bit map $= 1.3 * 2^{21}$ bits
                      $=  \frac{1.3 * 2^{21}}{8}$ Bytes
                      $= \frac{(1.3 * 2^{21}/8) }{ 2^{10}}$ KB 
                      $= 332.8$ KB
So, correct option is option no. A.

edited by
Answer:

Related questions

1 votes
1 votes
1 answer
1
go_editor asked Jul 26, 2016
2,868 views
Linux operating system usesAffinity schedulingFair Preemptive SchedulingHand ShakingHighest Penalty Ratio Next