Give memory partition of 100K ,500K, 200K, 300K and 600K (in order).How would each of the first fit, best fit and worst fit algorithm place process of 212 K, 417 K, 112K, and 426 K(in order)? Which algorithm makes the most efficient use of memory?
Answer :-
First fit
212 K is put in 500 K partition.
417 K is put in 600 K partition.
112 K is put in 288 K partition. (New partition 288 K = 500 K - 212 K)
426 K must wait.
Best-fit
212 K is put in 300 K partition.
417 K is put in 500 K partition.
112 K is put in 200 K partition.
426 K is put in 600 K partition.
Worst-fit
212 K is put in 600 K partition.
417 K is put in 500 K partition.
112 K is put in 388 K partition. (600 K - 212 K)
426 K must wait.
In this example Best-fit is the best solution.
Answers
Answered by
0
Answer:
Please mark me brainliest
Answered by
5
Best Fit algorithm makes the most efficient use of memory.
Explanation:
Given memory partition of and .
Processes in order are and
- For First Fit: The first job claims the first available memory with space more than or equal to its size.
is stored in a partition.
is stored in a partition.
is stored in a partition.
must wait as no partition can accommodate it.
- For Best Fit: The operating system first searches the whole of the memory according to the size of the given job and allocates it to the closest-fitting free partition in the memory.
is stored in a partition.
is stored in a partition.
is stored in a partition.
is stored in a partition.
- For Worst Fit: It allocates a process to the partition which is the largest memory among the freely available partitions.
is put in a partition.
is put in a partition.
is put in a partition.
must wait as no partition can accommodate it.
Similar questions