+1 vote
54 views
Given a disk-block size of $4\: KB$ and block-pointer address value of $4$ bytes, what is the largest file size (in bytes) that can be accessed using $10$ direct addresses and one indirect block?
| 54 views
0

## 3 Answers

+2 votes

Answer:

The Disk Block Size $= 4 \; \text{KB}$

Block Pointer address value $= 4\; \text{Bytes}$

Number of addresses $= \frac{4\; \text{KB}}{4\;\text {Bytes}} = \frac{2^{12}}{2^2}=2^{10} = \mathbf{1\;K}$

Largest File Size that can be accessed  using 10 direct addresses and one indirect block $= 10\;\text{Direct addresses} + 1 \; \text{Indirect block} = [ 10 + 2^{10} ] \times 4\;\mathbf{KB} = 4136 \;\textbf{KB}$

So, Largest Size possible $= 4136\;\textbf{KB}$.

by Boss (19.2k points)
edited by
0

@ankitgupta.1729

Can you please check this answer once?

I have doubts if it's correct or not.

0
number of address  in a indirect block = 2^10
0
Didn't get you?
0
Are you suggesting changes?
0
yes

how did u got 4 Bytes = 2^5

did u converted it into bits ?
0
Yes!
+1
Given that

Disk Block Size = 4KB

Block Pointer address value (DBA) = 4 Bytes

Number of Disk block addresses on one disk block = Disk Block Size /  Disk block address

=   2^(12) /  2^(2) = 2^(10)

Here find the largest file size  =  [ # of direct block +  ((DB size / DBA)^1 )............... ] *  DB size

=  [10  +  ( 2^(12)  /  2 ^(2) ) ]  *  4KB  =   4136 KB
0
0

Please edit your answer @JEET

0

Edited already?

Is there any mistake still?

@Lakshman Patel RJIT

0
Yes, just a small mistake, On the third line

$\dfrac{2^{12}}{2^{2}} = 2^{10} = 1\:K$

and , please used $KB$, not $kb.$
0
No, it will be $1\;K$ only and not $1\;KB$
0
I don't there is anyting logically incorrect with $kb$ and $KB$ but I still updated it so as to make it more decent.
0
Everything seems right,but please correct third line
0
What's wrong there?

Can you please tell me exactly?
+1

Number of addresses $= \dfrac{4\; \text{KB}}{4\;\text {Bytes}} = \dfrac{2^{12}}{2^2}=2^7 = \mathbf{1\;K}$

It should be Number of addresses $= \dfrac{4\; \text{KB}}{4\;\text {Bytes}} = \dfrac{2^{12}}{2^2}=2^{10} = \mathbf{1\;K}$

0
yes, that's right!

Thank You!!
+1 vote
Given that

Disk Block Size = 4KB

Block Pointer address value (DBA) = 4 Bytes

Number of Disk block addresses on one disk block = Disk Block Size /  Disk block address

=   2^(12) /  2^(2) = 2^(10)

Here find the largest file size  =  [ # of direct block +  ((DB size / DBA)^1 ).+.............. ] *  DB size

=  [10  +  ( 2^(12)  /  2 ^(2) ) ]  *  4KB  =   4136 KB
by Loyal (6.5k points)
+1 vote

Answer = 4MB

Block size = 4KB , Block address = 4B , Direct address = 10 , Single Indirect address = 1

No. of address per block = [no. of direct address + (Block size/block address) ]*4KB

= [10+(4KB/4B)]*4KB

= [10+1KB]*4KB =40KB + (2^10B * 2^12B ) =2^2 * 2^20B    // 40KB is negligible w.r.t 4MB

= 4MB

OR

if you do't want to neglect it then,

40KB+4MB = 40KB+4096KB = 4136KB

by Active (1k points)
0

@shivam001

Nice one!!

0
It is $10$ direct addresses and not the direct address.

There is a big difference.

0 votes
0 answers
2
0 votes
0 answers
4