Computer Science, asked by 9355abhishek, 2 months ago

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 prachigupta431
0

Answer:

Please mark me brainliest

Answered by rahul123437
5

Best Fit algorithm makes the most efficient use of memory.

Explanation:

Given memory partition of 100K ,500K, 200K, 300K and 600K.

Processes in order are 212 K, 417 K, 112K, and 426 K

  • For First Fit: The first job claims the first available memory with space more than or equal to its size.

212 K is stored in a 500 K partition.

417 K is stored in a 600 K partition.

112 K is stored in a 200 K partition.

426 K 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.

212 K is stored in a 300 K partition.

417 K is stored in a 500 K partition.

112 K is stored in a 200 K partition.

426 K is stored in a 600 K partition.

  • For Worst Fit: It allocates a process to the partition which is the largest memory among the freely available partitions.

212 K is put in a 600 Kpartition.

417 K is put in a 500 Kpartition.

112 K is put in a 300 K partition.

426K must wait as no partition can accommodate it.

Similar questions