Week 12
In Operating Systems, Segmentation is a memory management technique in which, the memory is divided into variable size parts. Each part is known as a segment which can be allocated to a process.
First Fit Algorithm is the simplest technique of allocating the memory block to the processes amongst all. In this algorithm, the pointer keeps track of all the free blocks in the memory and accepts the request of allocating a memory block to the coming process (Tutorial Point)
The next fit is a modified version of 'first fit'. It begins as the first fit to find a free partition but when called next time it starts searching from where it left off, not from the beginning. This policy makes use of a roving pointer. The pointer moves along the memory chain to search for the next fit (www.geeksforgeeks.org)
Best Fit. The best-fit deals with allocating the smallest free partition which meets the requirement of the requesting process. This algorithm first searches the entire list of free partitions and considers the smallest hole that is adequate. It then tries to find a hole that is close to the actual process size needed "www.tutorialspoint.com"
Program for Worst Fit algorithm in Memory Management. Worst Fit allocates a process to the partition which is largest sufficient among the freely available partitions available in the main memory. If a large process comes at a later stage, then memory will not have space to accommodate (geeksforgeeks)