FOR FREE CONTENT

Fair Share Scheduling

 

Generally in multitasking operating system CPU scheduling policies is to provide equitable service to processes, rather than to user or their applications.

 

So far we have assumed that each process is scheduled on its own, without regard to who its owner is. As a result, if user 1 starts up nine processes and user 2starts up one process, with round-robin or equal priorities, user 1 will get 90% of the CPU and user 2 only 10% of it.

 

To prevent this situation, some systems take into account which user owns a process (or group of processes) before scheduling it. In this model, each user (or group of processes owned by this user) is allocated some fraction of CPU, this is called a fair share.

 

Thus, it would be attractive to make scheduling decisions on the basis of these groups of process sets (User's processes). This approach is generally known as fair share scheduling.

 

As an example:

 

Thus if two users have each been promised 50% of the CPU, they will each get that, no matter how many processes they have in existence.

 

Consider a system with two users, each of which has been promised 50% of the CPU. User 1 has four processes, A, B, C, and D, and user 2has only one process, E. If round-robin scheduling is used, a possible scheduling sequence that meets all the constraints is this one:

 

A E B E C E D E A E B E C E D E ...

On the other hand, if user 1 is entitled to twice as much CPU time as user 2, we might get

A B E C D E A B E C D E ...

Numerous other possibilities exist, of course, and can be exploited, depending on what the notion of fairness is.

 

Scheduling is done on the basis of priority, which takes into account the underlying priority of the process, its recent processor usage, and the recent processor usage of the group to which the process belongs. The higher the numerical value of priority, the lower priority.

 

The following apply for process j in group k: 

 

 

Each process is assigned a base priority. The priority of a process drop as the process uses the processor and as the group to which the process belongs uses the processor. In the case of group utilization, the average is normalized by dividing by the weight of that group. The greater the weight assigned to the group, the less its utilization will affect its priority.

 

(UGC NET 2017) related to Fair Share Scheduling

 

Some of the criteria for calculating of priority of a process are:

(i)  Processor utilization by an individual process.

(ii)  Weight assigned to a user or group of users.

(iii) Processor utilization by a user group of processes.

 

In a fair share scheduler, priority is calculated based on

 

(a) (i) & (ii)  (b) (i) & (iii)  (c) (i), (ii) & (iii)  (d) (ii) & (iii) 

 

Answer:

 

From the above definition of fair share scheduling (Especially from the last paragraph), it is clear that priority depends on CPU/processor utilization of a process and also processor utilization of user group. 

On the other hand, the weight assigned to a group of users is also an effect priority because the greater the weight assigned to the group, the less its utilization will affect its priority.

 

So, (i), (ii) & (iii) all are correct. Option c) is correct.