Ask Question
11 June, 20:29

Which algorithm makes the most efficient use ofmemory?

+4
Answers (1)
  1. 11 June, 23:32
    0
    Best-fit Algorithm

    Explanation:

    Best-fit: Allocating the smallest memory location that is greater than or equal to the size of process.

    Example

    Let these are the memory locations-210kb, 310kb, 260kb, 610kb

    and size of processes-160kb, 450kb, 250kb, 300kb

    For the first-fit,

    We allocate 160 kb to the 210kb memory location

    Then, we allocate 450 kb to the 610kb because others don't have the size.

    Then, we allocate 250kb to the 310 kb.

    300 kb will stop, as no memory locations can execute.

    For the Best-fit,

    We allocate 160 kb to the 210kb memory location

    Then, we allocate 450kb to the 610kb.

    Then, we allocate 250kb to the 260kb not 310kb according to best-fit.

    Then we allocate 300kb to the 310kb.

    For the worst fit,

    We allocate 160 kb to the 610kb memory location according to the worst-fit algorithm.

    Then, we can't allocate 450kb to any memory location.

    Then, we allocate 250kb to the 310kb.

    We can' allocate 300kb in 260kb memory location.

    As we can see from this example that in First-fit algorithm 300kb process will stop as no memory location is there.

    In worst-fit algorithm, We can't allocate 450kb, 300kb to any memory locations.

    In Best-fit algorithm, we can allocate the process to each location, so this algorithm is using memory in a efficient way.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Which algorithm makes the most efficient use ofmemory? ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers