recategorized by
2,991 views
1 votes
1 votes

Assume that an implementation of Unix operating system uses i-nodes to keep track of data blocks allocated to a file. It supports 12 direct block addresses, one in direct block address and one double indirect block address. The file system has 256 bytes block size and 2 bytes for disk block address. The maximum possible size of a file in this system is

  1. 16 MB
  2. 16 KB
  3. 70 KB
  4. 71 KB
recategorized by

3 Answers

1 votes
1 votes
direct block addressing will point to 12 disk blocks=12*256B

Singly Indirect block addressing will point to 1 disk block which has 256/2 disc block addresses

                                                                            =128*256B

Doubly indirect block addressing has (256/2)*(256/2) disk block addresses

                                                                           =128*128*256B

Total File Size=(12+128+128*128)*256B

                      =4131KB

 

Or Alternatively you can do direct by formula

Max File size in File System=[#of Direct DBA +(DB Size/DBA)+(DB Size/DBA)^2+(DB Size/DBA)^3+........]*DB Size

 

Max File Size possible in file System=[ 12+ 256/2+ (256/2)^2]*256B

                                                        =4131KB

                                                         or 4MB(apx)

No option is true.
0 votes
0 votes

File size possible is 12* 256 + (256/2)*(256) +  (256/2)(256/6)*256  .

Maximum file size is (256/2)(256/2)*256  .

I am not sure . Let other verifythis !

0 votes
0 votes
I think memory access heirarchy is :

Double indirect addressing block -> indirect addressing block -> direct addressing block -> file block

 

So Max file size would be 128*128*128*256B = 512 MB
Answer:

Related questions

1 votes
1 votes
1 answer
1
1 votes
1 votes
1 answer
4
go_editor asked Jul 21, 2016
4,746 views
The hit ratio of a Transaction Look Aside Buffer (TLAB) is 80%. It takes 20 nanoseconds (ns) to search TLAB and 100 ns to access main memory. The effective memory access ...