Fair share scheduling

from Wikipedia, the free encyclopedia

Fair share scheduling is a scheduling method for operating systems in which the CPU usage is evenly distributed between the system users or groups, as opposed to the equal distribution between processes.

For example, if four users (A, B, C, D) are each running a process at the same time, the process scheduler divides the available CPU cycles so that each user gets 25% of all cycles (100% / 4 = 25%). If user B starts a second process, each user will still get 25% of all cycles, but each of B's ​​processes will now only use 12.5%. However, when a new user starts a process in the system, the scheduler will redistribute the available CPU cycles so that each user gets 20% of all cycles (100% / 5 = 20%).

Another level of abstraction makes it possible to divide users into groups and to apply the fair share algorithm to groups as well. In this case, the available CPU cycles are divided first by the number of groups, then by the number of users within the group, and then by the number of processes per user. For example, if there are three groups (1,2,3) each comprising three, two and four users, the available CPU cycles are divided as follows:

  • 100% / 3 groups = 33.3% per group
  • Group 1: (33.3% / 3 users) = 11.1% per user
  • Group 2: (33.3% / 2 users) = 16.7% per user
  • Group 3: (33.3% / 4 users) = 8.3% per user

A common method of the logical implementation of the fair share scheduling method is to apply the round robin scheduling method recursively at every abstraction level (processes, users, groups, etc.). The time quantum that the round robin needs is not important here, since every equal division of the time would produce the same results.

See also