in Operating System
1,405 views
7 votes
7 votes
Consider a disk with 80 GB. The size of disk block is 8 kB. Number of blocks needed to keep track of free space if the disk is initially empty by using bit map method is _____
in Operating System
by
1.4k views

3 Answers

11 votes
11 votes
Best answer
In the bitmap approach " every disk block will map with one binary bit (not matter it is free or not)"
total no of disk blocks=disk size/one disk block size = 80GB/8KB =10M
now one disk block contains 64 K bits so it contains info (free /busy) about 64K disk blocks.
so for 1 M blocks = 10M/64K=160 disk blocks.{--ans}
selected by

4 Comments

edited by
I think  u are using 1 K byte =1000 bits
so 10 *10^6 / 64* 10^3 = 156.25
But I M using 10*1024*1024/64*1024= 160
--- i think we need to focus on approach rather than ans btw in gate there ll be no such type of ambiguity they should mention it explicitly if.....
3
3
"every disk block will map with one binary bit (not matter it is free or not)"

and there are 10M blocks . So shouldnt it be 10M bits ?

Correct me if wrong
1
1

@Dulqar Yes, it is $10M$ bits. But we are asked Number of blocks needed to keep track of free space. So, divided by 64K.

0
0
7 votes
7 votes
in bit map each block is represented by a single bit 0/1.

so total no. of blocks = 80GB/8KB

                                   = 10M blocks

block size = 8KB hence

it can contain information of  8K*8bit =64K blocks

so required blocks are = 10M / 64K

                                     = 160 blocks

3 Comments

@pankaj elaborate this " it can contain information of  8K*8bit =64K blocks ". Why $8$ bit?

0
0
1byte =8 bit man.
0
0
ohh! I just missed it and it caused me $-ve$ marks.

Thanks bro
0
0
0 votes
0 votes
160 blocks ....is it right?

Related questions