What is the Best Fit Algorithm for Memory Partitions?

  • Thread starter Thread starter whitehorsey
  • Start date Start date
  • Tags Tags
    Fit partitions
Click For Summary
The best fit algorithm for memory partitions selects the smallest available partition that can accommodate an incoming process. For the given memory sizes of 10, 50, 20, 30, and 60 KB, the processes 21, 47, 5, and 45 KB are analyzed sequentially. The process of 21 KB fits into the 30 KB partition, and 5 KB fits into the 10 KB partition. For 47 KB, it would be placed in the 60 KB partition, as it is the only option available that can accommodate it, leaving a 13 KB hole. The best fit approach focuses on minimizing leftover space for each process without considering future allocations.
whitehorsey
Messages
188
Reaction score
0
1. If you had 10, 50, 20, 30, and 60 KB in order and wanted to work with these incoming processes 21, 47, 5, 45 KB find the best fit.


3. I know how to do 21 and 5 but for 47 and 45 I'm confused. Best fit says to produce the smallest left over hole. So, would I put 47 in 60 because it's smaller than 45 in 60?
(21 would go into 30 and 5 would go into 10)
 
Physics news on Phys.org
Best fit operates on the incoming processes one at at time, in the incoming order. There's no look ahead involved. For each process, best fit means to choose the smallest memory partition that the process will fit into.
 
rcgldr said:
Best fit operates on the incoming processes one at at time, in the incoming order. There's no look ahead involved. For each process, best fit means to choose the smallest memory partition that the process will fit into.

Thank You!
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 16 ·
Replies
16
Views
3K
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 18 ·
Replies
18
Views
13K
Replies
3
Views
5K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K