edited by
27,364 views
40 votes
40 votes

A unix-style I-nodes has $10$ direct pointers and one single, one double and one triple indirect pointers. Disk block size is $1$ Kbyte, disk block address is $32$ bits, and $48$-bit integers are used. What is the maximum possible file size?

  1. $2^{24}$ bytes
  2. $2^{32}$ bytes
  3. $2^{34}$ bytes
  4. $2^{48}$ bytes
edited by

6 Answers

Best answer
53 votes
53 votes

Size of Disk Block $= 1024 \text{ Byte}$

Disk Blocks address $= 4B$

No. of addresses per block $1024/4 = 256 = 2^8$ addresses

We have:

$10$ Direct

$1 \ SI = 2^8 \text{Indirect}\times 2^{10}  = 2^{18} \text{Byte}$

$1 \ DI = 2^8 \ SI = (2^8)^2 \text{Direct} = 2^{16} \text{Direct} ** 2^{10} = 2^{26} \text{Byte}$

$1 \ TI = 2^8 \ DI = (2^8)^2  \ SI = (2^8)^3 = 2^{24} \text{Direct} =2^{24} \times 2^{10} = 2^{34} \text{ Byte}.$

So, total size $= 2^{18} + 2^{26} + 2^{34} \text{ Byte} + 10240 \text{Byte}$. Which is nearly $2^{34} \ \text{Bytes}$. (We don't have exact option available. Choose approximate one)

Answer $\rightarrow$ (C)

edited by
31 votes
31 votes

no of address in one block=$2^{10}/2^2=2^8$ as triple pointer used  max possible size$=2^8\times 2^8 \times 2^8\times 2^{10}=2^{34}$ Bytes 

ans is C

16 votes
16 votes
Size of Disk Block = 1Kbyte

Disk Blocks address = 32bits, 
but 48 bit integers are used for address
Therefore address size = 6 bytes
                    

No of addresses per block = 1024/6  = 170.66 
Therefore 170 ≈ 2^8 addresses per block can be stored

Maximum File Size = 10 Direct + 1 Single Indirect + 
                    1 Double Indirect + 1 Triple Indirect
                 = 10 + 2
8 + 28*28 + 28*28*28 ≈ 224 Blocks Since each block is of size 210 Maximum files size = 224 * 210 = 234
10 votes
10 votes

Size of Disk Block =1024 Byte 

Disk Blocks address = 32 bit, but 48 bit integers are used for address
Therefore address size = 6 bytes

No. of addresses per block 1024/6 = 170 addresses 

Maximum File Size = 10 Direct + 1 Single Indirect +  1 Double Indirect + 1 Triple Indirect
                 = 10 + 170 + 1702 + 1703
                 ≈ 222 Blocks

Since each block is of size 210  B            

Maximum files size = 222 * 210  = 232    B

Answer - B

Answer:

Related questions

23 votes
23 votes
3 answers
2
Kathleen asked Sep 18, 2014
12,469 views
Consider the following set of processes, with the arrival times and the CPU-burst times gives in milliseconds.$$\small \begin{array}{|c|c|c|} \hline \textbf{Process} & \t...
66 votes
66 votes
9 answers
3
Kathleen asked Sep 18, 2014
23,662 views
The minimum number of page frames that must be allocated to a running process in a virtual memory environment is determined bythe instruction set architecturepage sizenum...