Question

Consider a file system on a disk that has both logical and physical block sizes of...

Consider a file system on a disk that has both logical and physical block sizes of 512 bytes. Assume that the information about each file is already in memory. For each of the three allocation strategies (contiguous, linked, and indexed), answer these questions:

If we are currently at logical block 5 (the last block accessed was blocked 4) and want to access logical block 15, how many physical blocks must be read from the disk?

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

If we are currently at logical block 5 (the last block accessed was block 4) and want to access logical block 15, the number of physical blocks must be read from the disk are given as follows:

Contiguous

Divide the given logical address by 512. E and F represents the quotient and the remainder respectively.

Assume Y to be the starting address of the file.

Add E to Y to get the physical block number.

The displacement into the block is represented by F.

So, if the logical block is 5, the number of blocks as per the contiguous method, the readable blocks are 1.

Linked

Divide the given logical address by 511. E and F represents the quotient and the remainder respectively.

So, for chasing the linked list, the number of blocks obtained are A+1.

In this the number of displacements would be B+1.

So, if the logical block is 5, the number of blocks as per the linked method, the readable blocks are 15.

Indexed

Divide the given logical address by 512. E and F represents the quotient and the remainder respectively.

To get the indexed block into the memory, the address of the physical block is there in the index block which is at the location of A.

The displacement here is B.

So, if the logical block is 5, the number of blocks as per the indexed method, the readable blocks are 7.5

Add a comment
Know the answer?
Add Answer to:
Consider a file system on a disk that has both logical and physical block sizes of...
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