Question

10.a. Consider a file F which contains a sequence of variable-length records, with records length (n) as following: RI n-4 R

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

Solution: The solution of Q.10(a)(1) is already given in question you can see but record is not assigned in variable blocking spanned and variable blocking unspanned method. So here we assigned the records in variable blocking spanned and variable blocking unspanned method. And discuss why variable blocking unspanned is less efficient compared to variable blocking spanned.

Variable blocking spanned:

                                                                                   Disk X

     Block 1(length =10)                            Block2(length =10)                          Block3(length =10)

R1(n=4)

R2(n=5)

R3(n=1)

R3(n=1)

R4(n=4)

R5(n=2)

R6(n=3)

R6(n=4)

6B wastage

Variable blocking unspanned:

                                                               Disk X

    Block 1(length =10)                         Block2(Length =10)                            Block3(length =10)

R1(n=4)

R2(n=5)

1B wastage

R3(n=2)

R4(n=4)

R5(n=2)

2B wastage

R6(n=7)

3 B wastage


In variable blocking spanned we can span the records in different block Means portion of a single record may accupied in different blocks due to their large size, such records are called Spanned Records. So, the memory wastage is less than variable blocking unspanned. As you see in figure, Memory wastages in only one blocks 3.

But in variable blocking unspanned we cannot spanned the records in different block. So, the memory wastage is more than variable blocking spanned. You can see in figure Memory wastages accrues in each block 1,2 and 3 also.

If we want to add some additional records the we can lie in remaining size of block 3 in spanned but in unspanned we require an extra block for it.so the increasing no of blocks makes more difficulty to accessing it and more time required for it. But it is not happening in spanned so we can say that variable blocking unspanned is less efficient compared to variable blocking spanned.

figure:

Variable blocking spanned: Disk X Block 1(length =10) Block2(length =10) Block3(length =10) R1(n=4) R2(n=5) R3(n=1) R3(n=1) R


Add a comment
Know the answer?
Add Answer to:
10.a. Consider a file F which contains a sequence of variable-length records, with record's length (n)...
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