edited by
20,534 views
55 votes
55 votes
A FAT (file allocation table) based file system is being used and the total overhead of each entry in the FAT is $4$ bytes in size. Given a $100 \times 10^6$ bytes disk on which the file system is stored and data block size is $10^3$ bytes, the maximum size of a file that can be stored on this disk in units of $10^6$ bytes is _________.
edited by

5 Answers

Best answer
113 votes
113 votes
Each datablock will have its entry.
So, Total Number of entries in the FAT $= \large \frac{\text{Disk Capacity}} {\text{Block size}} = \frac{100MB}{1KB} = 100K$

Each entry takes up $4B$ as overhead

So, space occupied by overhead = $100K \times 4B = 400KB = 0.4MB$

We have to give space to Overheads on the same file system and at the rest available space we can store data.

So, assuming that we use all available storage space to store a single file = Maximum file size = $\text{Total File System size} -\text{Overhead} = 100MB - 0.4MB = 99.6 MB$
edited by
16 votes
16 votes
no of entries that can be stored=100*10^6/(1000+4)  =0.09960*10^6

maximum file size=0.09960*10^6   * 10^3=99.6 *10^6

ans is 99.6
11 votes
11 votes
Here block size is 10^3 B.
No. of entries in the FAT = Disk capacity/ Block size 
                          = 10^8/10^3 
                          = 10^5
Total space consumed by FAT = 10^5 *4B 
                            = 0.4*10^6B
Max. size of file that can be stored = 100*10^6-0.4*10^6
                                     = 99.6*10^6B.
So answer 99.6.
6 votes
6 votes

Total no. of entries = $\frac{Disk size}{one block size}$ = $\frac{10^{8}}{10^{3}}$ = $10^{5}$

Space occupied by overhead = one block overhead x Total no. of blocks

                                = 4 x $10^{5}$ bytes

maximum file size = Disk size - space consumed by overhead

                            = $10^{8}$ -  $4\times 10^{5}$

= 99.6 * 10^6 Byte

                                                          OR

page table size + process page size <= Disk size  

(assume no of pages in process is x)
x*4 + x* 10^3  <= 100*10^6
x   <=  100*10^6 / 1004
x  <=0.0996 * 10^6
process size in 10^6  =  no of pages * one page size
              = 0.0996 * 10^6  * 10^3
              = 99.6 * 10^6 Byte
 

edited by
Answer:

Related questions

47 votes
47 votes
3 answers
3
go_editor asked Sep 28, 2014
13,512 views
The number of distinct minimum spanning trees for the weighted graph below is _____