File size

Enter Name of Correspondence Set, Page Number, Question Number, Your Name and Roll Number for Query!

Moderator: CS Moderators Team

File size

Postby mathalor » Sun Dec 07, 2008 10:19 pm

Page No:190 Q.no:8 gate 2004(IT)

In a particular UNIX OS, each data block is of size 1024 bytes,each node has 10 direct data block address and three additional addresses:one for single indirect address,one for double indirect block,one for triple indirect block.
Also each block can contain addresses for 128 blocks.which one of the following is approximately the maximum size of a file.

a)512 MB
b)2GB
3) 8GB
d)16GB

Anyone can explain the solution!
mathalor
 
Posts: 74
Joined: Fri Nov 14, 2008 9:09 pm
My College/Company:: Home
Roll Number: 812057

Re: File size

Postby mpkpawan07 » Tue Dec 09, 2008 6:20 pm

answer is B
let me know if my answer is correct or not please.
to know how to solve these kind of problems please refer to THIS post
mpkpawan07
Gatementor Veteran
Gatementor Veteran
 
Posts: 515
Joined: Sat Dec 08, 2007 10:59 am
Currently what are you doing?: Am Studying
My College/Company:: MSEC
Roll Number: 662514
Packages: Test Series (TS)
City: Chennai

Re: File size

Postby mathalor » Tue Dec 09, 2008 6:58 pm

I don't know what is correct option, but i am also getting the same i.e 2 GB

let me know the way to calculate pointer/block in this problem is as follows or not............

the total no of direct pointers in a block is= 1024*128/1024= 128

Is this correct or not?
mathalor
 
Posts: 74
Joined: Fri Nov 14, 2008 9:09 pm
My College/Company:: Home
Roll Number: 812057

Re: File size

Postby mpkpawan07 » Tue Dec 09, 2008 7:03 pm

mathalor wrote:let me know the way to calculate pointer/block in this problem is as follows or not............



hey the number of pointers/block in this question has been given to be 128, so you need not do all that!
but the post to which i directed you does not explicitly mention the number of pointers/block, and that is why i calculated!
hope you understand! :)
mpkpawan07
Gatementor Veteran
Gatementor Veteran
 
Posts: 515
Joined: Sat Dec 08, 2007 10:59 am
Currently what are you doing?: Am Studying
My College/Company:: MSEC
Roll Number: 662514
Packages: Test Series (TS)
City: Chennai

Re: File size

Postby mathalor » Tue Dec 09, 2008 7:18 pm

ok!

thanks
mathalor
 
Posts: 74
Joined: Fri Nov 14, 2008 9:09 pm
My College/Company:: Home
Roll Number: 812057

Re: File size

Postby monika17ap » Wed Nov 20, 2013 10:37 pm

A UNIX file system has 1-KB blocks and 4-byte disk address. What is the maximum file size if i-nodes contain 10 direct entries, and one single, double and triple indirect entry each?

the above question and your questions are whether same..??

If the answer of this question is 2GB..then can you explain, plz..
monika17ap
 
Posts: 13
Joined: Tue Nov 19, 2013 11:19 am
My College/Company:: WCE, Sangli
Roll Number: 99999999

Re: File size

Postby sameer2009 » Thu Nov 21, 2013 10:49 am

monika17ap wrote:A UNIX file system has 1-KB blocks and 4-byte disk address. What is the maximum file size if i-nodes contain 10 direct entries, and one single, double and triple indirect entry each?
the above question and your questions are whether same..??

here disk address size is 4B

In a particular UNIX OS, each data block is of size 1024 bytes,each node has 10 direct data block address and three additional addresses:one for single indirect address,one for double indirect block,one for triple indirect block.
Also each block can contain addresses for 128 blocks.which one of the following is approximately the maximum size of a file.
here disk address size = x
1024/x = 128
x = 8B
Check this out!!! Free Android App for Computer Science and Engineering Exam.
Download .apk file @ tinyurl.com/csexamapp
See How To Use @ tinyurl.com/csexamapplication
sameer2009
Gatementor Guru
Gatementor Guru
 
Posts: 1433
Joined: Tue Sep 09, 2008 5:29 pm
My College/Company:: lt
Roll Number: 99999

Re: File size

Postby monika17ap » Thu Nov 21, 2013 11:12 am

ok..
and above given question's ans is 2GB??
monika17ap
 
Posts: 13
Joined: Tue Nov 19, 2013 11:19 am
My College/Company:: WCE, Sangli
Roll Number: 99999999

Re: File size

Postby sameer2009 » Thu Nov 21, 2013 3:01 pm

Question wrote:A UNIX file system has 1-KB blocks and 4-byte disk address. What is the maximum file size if i-nodes contain 10 direct entries, and one single, double and triple indirect entry each?

block = 2^10
block pointer size = 4B
entries possible in block = 2^10 / 2^2 = 256
direct pointer gives = 10 * 256 = 10 blocks
single indirect gives = 256 * 256 = 2^8 blocks
double indirect gives = 256 * 256 * 256 = 2^16 blocks
triple indirect gives = 256 * 256 * 256 * 256 = 2^14 blocks
total = 16777546 blocks = 16777546 * 1024 = 17180207104 ~ 16 GB



Question wrote:In a particular UNIX OS, each data block is of size 1024 bytes,each node has 10 direct data block address and three additional addresses:one for single indirect address,one for double indirect block,one for triple indirect block.
Also each block can contain addresses for 128 blocks.which one of the following is approximately the maximum size of a file.

block = 2^10
block pointer size = 1024/128 = 8
entries possible in block = 2^10 / 2^3 = 128
direct pointer gives = 10 * 128 = 10 blocks
single indirect gives = 128 * 128 = 2^7 blocks
double indirect gives = 128 * 128 * 128 = 2^14 blocks
triple indirect gives = 128 * 128 * 128 * 128= 2^21 blocks
total = 16777546 blocks = 16777546 * 1024 = 17180207104 ~ 16 GB
total = 2113674 blocks = 2113674 * 1024 ~ 2GB
Check this out!!! Free Android App for Computer Science and Engineering Exam.
Download .apk file @ tinyurl.com/csexamapp
See How To Use @ tinyurl.com/csexamapplication
sameer2009
Gatementor Guru
Gatementor Guru
 
Posts: 1433
Joined: Tue Sep 09, 2008 5:29 pm
My College/Company:: lt
Roll Number: 99999


Return to CS Question

Who is online

Users browsing this forum: No registered users and 1 guest
cron