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 9 processes and user 2 starts up 1 process, with round robin or equal priorities, user 1 will get 90% of the CPU and user 2 will get only 10% of it.

To prevent this situation, some systems take into account who owns a process before scheduling it. In this model, each user is allocated some fraction of the CPU and the scheduler picks processes in such a way as to enforce it. 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.

As an example, 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 2 has only 1 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 ...

Summary

  • FCFS: not fair, and average waiting time is poor;
  • Round Robin: fair, but average waiting time is poor;
  • SJF/SRTF: Not fair, but average waiting time is minimized assuming we can accurately predict the length of the next CPU Starvation is possible;
  • Multilevel Feedback Queuing: An improvement of SJF/SRTF;
  • Lottery Scheduling: Fairer with low average waiting time, but less predictable.