Give an examples of First-Fit algorithm.
Suppose four memory partitions of 10MB, 50MB, 15MB, and 60MB are in order. How
would First-Fit algorithm place processes of 20MB, 40MB, 12MB, and 37MB (in
The First-Fit will place the processes as follows;
(i) process of 20MB will be placed in 50MB partition by dividing it into, two
pieces i.e. 20MB and 30MB. So 20MB is used for process and 30MB is created a new
(ii) process of 40MB will be placed in 60MB partition by dividing it into two
pieces i.e. 40MB and 20MB. So 40MB is used for process and 20MB is created a new
(iii) process of 12MB will be placed in 30MB partition that is created in
(iv) process of 37MB must wait.