Fair Share Scheduling Scheduling Processes and Threads

3.3.6 Fair Share Scheduling

Most schedulers attempt to serve all jobs as best they can, subject to the fact that jobs have different characteristics. Fair share scheduling is concerned with achieving predefined goals. This is related to quality of service guarantees. Administrative considerations may define “fairness” Fair share scheduling tries to give each job what it deserves to get. However, “fair” does not necessarily imply “equal”. Deciding how to share the system is an admin- istrative policy issue, to be handled by the system administrators. The scheduler should only provide to tools to implement the chosen policy. For example, a fair share of the machine resources might be defined to be “proportional to how much you paid when the machine was acquired”. Another possible criterion is your importance in the organization. Your fair share can also change with time, reflecting the current impor- tance of the project you are working on. When a customer demo is being prepared, those working on it get more resources than those working on the next generation of the system. Shares can be implemented by manipulating the scheduling A simple method for fair share scheduling is to add a term that reflects resource usage to the priority equation. For example, if we want to control the share of the resources acquired by a group of users, we can add a term that reflects cumulative resource usage by the group members to the priority equation, so as to reduce their priority as they use more resources. This can be “aged” with time to allow them access again after a period of low usage. The problem with this approach is that it is hard to translate the priority differences into actual shares [8, 3]. An alternative approach is to manipulate the time quanta: processes that should receive more runtime are just given longer quanta. The problem with this approach is that the actual runtime they receive is the product of the quantum length and how often they are scheduled to run. It may therefore be necessary to monitor the actual shares and adjust the quanta dynamically to achieve the desired division of resources. Exercise 63 This presentation provides fair shares at the expense of performance-driven priorities as used in the multilevel feedback scheme described above. Can the two be combined? To read more: Various other schemes for fair-share scheduling have been proposed in the lit- erature. Two very nice ones are lottery scheduling, which is based on a probabilistic allocation of resources [16], and virtual time round robin VTRR, which uses a clever manipulation of the queue [12]. 77

3.4 Summary