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

2 votes
2 votes

I-nodes are structured like this:-

Image source: https://www.chegg.com/homework-help/questions-and-answers/shown-figure-4-33-unix-node-10-direct-address-entries-one-single-double-triple-indirect-ad-q20611721


Each block can have addresses = $2^8$

Maximum level of indirect pointers is 3. So, each such $2^8$ addresses will point to $2^8$ addresses again, which will point to $2^8$ more addresses.

It is equal to $(2^8)^3$ addresses.

=> $2^{24}$ addresses.

Each address points to a block. Block Size is $2^{10}$ Bytes.

So, File Size = $2^{34}$

 

Now we have to do the same for 2 level of indirect pointers, and again for 1 level. But they'll be negligible compared to Triple Indirect Level as $2^8 << 2^{16} << 2^{24}$. We can approximate it as $2^{24}$ addresses, and then multiply by the block size.

Option C


This is sort of like a quick answer. The best answer here describles the actual, proper procedure.

1 votes
1 votes
Size of Disk Block =1024 Byte

Disk Blocks address = 32 bit, but 48 bit integers are used for address

Therefore address size =48/8= 6 bytes9 (We always refer the address size )

No. of addresses per block 1024/6 = 170 addresses (approx)

Maximum File Size = 10 Direct + 1 Single Indirect +  1 Double Indirect + 1 Triple Indirect

                 = 10 + 170 + 170*170 + 170*170*170

                 ≈ 2^22 Blocks

Since each block is of size 2^10  B            

Maximum files size = 2^22 * 2^10  = 2^32    B

also, this is an approx answer
Answer:

Related questions

23 votes
23 votes
3 answers
2
Kathleen asked Sep 18, 2014
12,470 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,663 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...