Fair Share Scheduling:oGroup processes into sets oThese sets could be formed on a per user basis or on a user group basis, as well oBalancing the scheduling is performed with respect to these sets. oFor instance, each user (or user group) is assigned a weighing of some sortthat defines the fraction of resources that corresponding processes may useoThe scheduling is done with priorities and the formulae for a process jin agroup kwould look like: CPUj(i) = CPUj(i-1)/2 GCPUj(i) = CPUj(i-1)/2 Pj(i) = BASEj + CPU(i-1)/2 + GCPUk(i-1)/(4*Wk)where CPUj(i)is a measure of CPU utilization by process jthrough interval iGCPUk(i)is a measure of processor utilization of group kthrough interval iPj(i)is the priority of process jat the beginning of interval i(lowervalues mean higher priorities) BASEjis the base priority for process jWkis the weighting assigned to group k, with 0 <= Wk <= 1and the sum of Wk's over kis equal to 1. As we can see, each process is assigned a base priority and the priority of a process is dynamically controlled by the above equations. 4. 4.3 BSD Unix Scheduling Here we proceed to describe an example of the scheduling policy implemented in 4.3 BSD: The quantum time is set to 1 second Priority is computed with respect to process type and execution history. The equations governing their behavior are : oCPUj(i) = CPUj(i-1)/2 Compiled by http:50
oPj(i) = BASEj + CPU(i-1)/2 + NICEj, where NICEjis a user supplied value. Each second, the priorities are recomputed by the scheduler and a new scheduling decision is made. CS305b OPERATING SYSTEMS1. Multiprocessor Scheduling Usually, processes are not dedicated to processors in a multiprocessor machine. General solutions to the scheduling problem would not be available then. We have seen that on a single processor machine, sophisticated algorithms for scheduling may improve Compiled by http:51
performance. However, with multiprocessor computers, these refinements may lead to unnecessary scheduling overhead. As a matter of fact, maximum utilization of each processor is less of an issue in multiprocessors, where we tend to favor increased speed ofexecution through parallelism. In addition, the use of threads is a common way to achievethis parallelism effectively. 2. Process Scheduling In a multiprocessor machine, the typical scheduling algorithms we find are rather simple. For instance, there can be a unique process queue, and each processor takes the first process from the queue and runs it. This is an attractive scheme, for it is simple. However, it is easy to imagine how to slow down such a system. Given short execution time processes and a constant flow of them arriving in the queue, then all processors will have to contend for gaining access to the process queue to pick up their next process to run.