in Operating System edited by
772 views
1 vote
1 vote

 

in Operating System edited by
by
772 views

12 Comments

Please Anybody Help me with this :(
0
0
Any little hint will also be appreciable.
0
0
is 16MB answer.?
0
0
No brother its 4096.

Let me upload the Solution of ACE
0
0

My doubt is that in single level directory all files are there in the same directory. So how above relation is established ?

0
0

well i gave size of total file system...look this picture we are using single level directory here at first level we are storing disk block addresss..so there would be 1k entries(in picture its written 1KB cnacel that B its 1k entries)..but in qsn they have said directory is housed in 4 blocks so same scenario for other 3 blocks too....and as entry store address of some file so they have given total no of files like this 1k*4=4096max files....if size they would have asked than it would have been 16MB means total size of file system qsn wordings confused me too

1
1

Sir Hold, Please See am i right ?

In a single level directory at root level we store the User file Directory i.e. UFD like :-



So at root level i.e. First level we are storing User Directory or Directory addresses.Now at second level we have the Files.

In your picture the Block of 4KB is it the Root Level ???

If it is then since in Single root directory we have only two levels then the:

           Number of blocks or UFD   =   Size of block / Disk block Address = 4KB/4B = 1k total UFD's Possible.

But in question it says that the root level is housed in 4 blocks so the same scenario will occur for all three blocks So. Total number of Pointer or UFD's is 4 * 1k = 4096.

Some Doubts:-

A.  directory is housed in 4 blocks

It means that the root Directory level is stored in 4 blocks and in every block 1k total UFD's Possible isn't it brother ?

 

B . Here we are asked to find the total number of files, 4096 are total UFDs possible and by this we are assuming that in one directory only 1 file is present so total files are 4096. But sir is it really that every directory will have only one File ???

C. And please also tell how did you calculated total size of file System

1
1
edited by
same confusion

yes the B part which you wrote that how can we consider one UFD pointer pointing one file..well qsn framing is bit different not normal as we do....they should have asked about total file size of system than there would have some meaning but here its bit different.

well you are correct in every aspect..what you wrote here....and i am not sir call me borther only..:)

total file size you can calculate by just multiplying 4KB block size

as there 1k ufd pointer pointing to one block and now each block size is 4kb mutliply it 1k*4kb...as they have mentioned you are using 4 disk block for directory so multiply in total by 4*1k*4kb=2^24=16MB
0
0
Brother, Here you are only calculating the Size of total Root File Directory i.e.

1 block is of 4KB and we are using 4 such blocks so total 16KB.

===>   Is the size of total file system = Only size of root file Directory  ???    

Not the blocks Pointing by the UFDs

Because a file system has :-     Boot Block , Super Block , Inode List , Data Block    (Unix Structure)

It also contains data blocks right ?? so why aren't we adding that ??? or am i missing somethin'
0
0
no one pointer will point to one disk block..so 1k entries in one disk block pointing to 1k blocks of size 4KB...so similarly you have 4such blocks which are storing disk block address..so 4*1k*4KB...directory are storing DBA they are not considered in calculating total size of file system...correct me i am wrong
0
0
Hold on, So total size of file system is total number of blocks it is holding am i right ?
0
0
look addressing we are doing is not a part of file that is done for our own convinience to map some address of file when searching(its kind of index)...file is occupying 16MB only.
0
0

2 Answers

1 vote
1 vote
No of Addresses that can fit in a single block = Block Size / Disk Address size = 4KB/4B(32 bit) = 1024

In total there are 4 Blocks

therefore it can support -> 4 * 1024 Files = 4096 Files
0 votes
0 votes
This question cant be of CN, i think it is of Comp.Org

Related questions

1 vote
1 vote
0 answers
1