1

Suppose I have two processes of 50 bytes and have only one partition of 100 bytes. Suppose the first process takes up the partition and 50 bytes is remaining . Can the second process reside in the same partition even if free space is available or will internal fragmentation occur?

Also is it true that if internal fragmentation is present then external fragmentation is also present?

Zephyr
  • 1,313
  • 3
  • 16
  • 33

1 Answers1

1

Since there is only one partition, internal fragmentation will occur because internal fragmentation is the left space inside a partition and in this example 50 bytes will be left free inside the partition.

Also is it true that if internal fragmentation is present then external fragmentation is also present?

No, its not true. External fragmentation is the free space left when you dont have larger blocks and you have free blocks(or partitions) available but none of them alone can satisfy the requirement.

So basically the total amount of free space will be greater or equal to space required but it will not be contiguous and this is called external fragmentation.

Sumeet
  • 7,440
  • 2
  • 21
  • 42
  • So can't the second process occupy those 50 bytes? – Zephyr Aug 02 '17 at 13:02
  • @Zephyr If its fixed-partition scheme then it can. Otherwise it cannot. – Sumeet Aug 02 '17 at 13:19
  • I think that even in fixed partition we can't have have 2 processes. I read somewhere that in case of first fit algorithm, 2 processes cannot occupy the same hole even if space is available. Is it true? – Zephyr Aug 02 '17 at 13:21
  • @Zephyr In fixed-partition scheme if a hole of 100 bytes is taken by 50 bytes process, then the remaining 50 bytes becomes another hole. – Sumeet Aug 02 '17 at 13:25