/    /  OS – Allocation of frames in OS

Allocation of frames in OS

 

The main memory of the system is divided into frames.

The OS has to allocate a sufficient number of frames for each process and to do so, the OS uses various algorithms.

 

The five major ways to allocate frames are as follows:

 

  1. Proportional frame allocation

The proportional frame allocation algorithm allocates frames based on the size that is necessary for the execution and the number of total frames the memory has. 

The only disadvantage of this algorithm is it does not allocate frames based on priority. This situation is solved by Priority frame allocation.

 

  1. Priority frame allocation

Priority frame allocation allocates frames based on the priority of the processes and the number of frame allocations.

If a process is of high priority and needs more frames then the process will be allocated that many frames. The allocation of lower priority processes occurs after it.

 

  1. Global replacement allocation

When there is a page fault in the operating system, then the global replacement allocation takes care of it. 

The process with lower priority can give frames to the process with higher priority to avoid page faults. 

 

  1. Local replacement allocation

In local replacement allocation, the frames of pages can be stored on the same page. 

It doesn’t influence the behavior of the process as it did in global replacement allocation.

 

  1. Equal frame allocation

In equal frame allocation, the processes are allocated equally among the processes in the operating system. 

The only disadvantage in equal frame allocation is that a process requires more frames for allocation for execution and there are only a set number of frames. 

 

Frames allocation in OS reference