## Memory Allocation

## Memory-Allocation-Algorithm

Edit**Q
Explain in brief the memory allocation algorithm with example (
First fit, Best fit and worst fit ) …. Dec 2017 ( Marks – 6 )**

Ans :- First Fit :- In this algorithm the first free partition is allocated to process which has enough memory for processing purpose.

Best Fit :- This algorithm allocates the smallest free partition that can accommodate the process.

Worst Fit :- The worst fit algorithm allocates the largest free partition that can accommodate the processes.

All these algorithms have to scan the partition table to find out free partitions. * Given the memory partitions of size 100k, 500k , 200k, 300k and 600k in order. How would each of the first fit, best – fit, worst fit algorithms place the processes of 212 k, 417 k 112 k and 426 k ( in order ) ?

First Fit

**Q
Consider the memory partition as 200 k, 400 k, 600 k, 500 k, 300
k, 250 k in sequence. How would each of the first fit, best fit and
worst fit algorithm plays the processes of 357 k, 210 k, 468k, 491 k,
are to be allocated in order which algorithm makes most efficient use of
memory. ( 5 m)**

Ans :- P1 = 357 k, P2 = 210 k, P3 = 468 k, P4 = 491 k

## References

Edit- WikiNote Foundation