Question

Given a Ext3 filesystem that uses: - 32 bit addresses, - 512 byte blocks on disk, - 16 direct add...

Given a Ext3 filesystem that uses:
- 32 bit addresses,
- 512 byte blocks on disk,
- 16 direct addresses and
- up to a level 3 indirection
Answer the following questions:
1) How many blocks does a 12KiB file need?   
2) What is the largest file size (in KiB) that does not need indirect block references?
3) What is the largest file size (in KiB) possible using only single indirection?  
4) A file that is 1104 bytes in size, what is it's "size on disk" (in bytes)?

NOTE! Each answer should be just the number value without post-fix (like KiB or blocks etc.).

1 0
Add a comment Improve this question Transcribed image text
Answer #1

1. Since the block size is 512 bytes = 29 bytes. Hence number of blocks a 12 KiB file need = 12*210 bytes / (29 bytes) = 24 blocks

2. Since there are 16 direct address, where each such address can be reference to an individual block, hence the largest file size that does not need indirect block references = 16*(size of blocks) = 16*512 bytes = 8*210 bytes = 8 KiB

3. Since address length = 32 bits = 4 bytes. Hence number of addresses that can be stored per block = 512/ 4 = 128

So, if only one single indirection is used, then there will be one indirect pointer to a block which will store address of all 128 blocks. Hence the largest size file possible using only single indirection = 128*64 bytes = 213 bytes = 8 KiB

4. A file will occupy space in memory which is multiple of size of blocks.

Since size of block = 64 bytes. Hence number of blocks needed by 1104 byte size file = 1104 64 17.25 18 blocks

Hence the size on disk = 18*64 bytes = 1152 bytes

Please comment for any clarification.

Add a comment
Know the answer?
Add Answer to:
Given a Ext3 filesystem that uses: - 32 bit addresses, - 512 byte blocks on disk, - 16 direct add...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT