OS Local versus Global Allocation Policies

How memory should be allocated among the completing runnable processes is a major issue associated with paging system.

In the figure given below, that is, A, B, and C are the three processes that make up the set of runnable processes.

local versus global allocation policies

Now let's suppose that the process A gets a page fault. Now the question is, should the page replacement algorithm try to find the least recently used page considering currently six pages only allocated to the process A or should it consider all pages in the memory.

If it looks only at the pages of the process A, then the page with the lowest age value is A5, therefore we will get the situation of the figure given below:

operating system local global allocation

What if the page with lowest age value is removed without regard to whose page it is ? Then the page B3 will be chosen and we will get the situation of the figure given below:

global local policies os

Here, the algorithm of the second figure is said to be local page replacement algorithm and the algorithm of the third figure is said to be global page replacement algorithm.

To allocate a fixed fraction of the memory to every process, the local algorithm correspond, whereas global algorithm dynamically allocate page frames among the runnable processes. Therefore the page frame's number assigned to each process varies in time.

Global algorithms generally works better than the local one, mainly when the size of working set can vary over the process lifetime.

Operating System Online Test

« Previous Tutorial Next Tutorial »

Like/Share Us on Facebook 😋