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?
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.
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.