3.3k views

Suppose we have variable logical records of lengths of $5$ bytes, $10$ bytes and $25$ bytes while the physical block size in disk is $15$ bytes. What is the maximum and minimum fragmentation seen in bytes?

1. $25$ and $5$
2. $15$ and $5$
3. $15$ and $0$
4. $10$ and $5$

retagged | 3.3k views

Question no 2.4 in the above pdf

by (369 points) 1 flag:
✌ Edit necessary (logan1x “Linked update required.”)

selected
+1
Can someone explain how the max value is 10 ?

The 25 bytes block uses two physical blocks of 15 bytes so the space wasted is of 5 bytes.

The other two blocks of 10 bytes and 5 bytes can fit together in a physical block of 15 bytes.

So max space wasted is of 5 bytes right ?
+2
For 5 bytes record, it will have 10 byte space wasted. [ 15 byte - 5 byte = 10 byte (waste) ]

Now we have Logoical Records of 5B , 10 B and 25 B

assuming that records are spanned .

saY record 1= 5B

Recorrd 2= 10B

Record 3= 25B

Minimum amount of fragmentation will happen if i allocate record in  R1R2R3. each will give mInimum Fragmentation value OF 5

Max amount of fragmentation will happen if i allocate record in  R1R2R3OR R2R1R3. each will give mAX Fragmentation value OF 10

hence 10 and 5  will be answer ---Option d

by Loyal (9.9k points)
edited by
0
here third record 25B
+1
Sorry it was typing mistake :)
0
@dexter: can u give any picture of your explanation?
0
Block size 15 B

Maximum we can put 10B and 5B records

So, fragmentation 0

Maximum fragmentation will be 15B

by Veteran (119k points)
0
Is option C correct or option D?
I logically think it is option C.
Since the physical block size is only 15 bytes, we will require 2 physical blocks to store 25 byte data.

One block will be fully occupied and for the second block only 10 bytes will be used resulting in unused 5 bytes.

So,

Maximum fragmentation = 10 bytes

Minimum fragmentation = 5 bytes

Option D is correct.
by (41 points)
reshown by