Fair Share Scheduling Algorithm

Q1. Explain Fair Share Scheduling.

Ans. Solaris 9 introduced two new classes of scheduling:

  1. Fixed Priority
  2. Fair Share

Threads in fixed priority class have the same priority range as in time sharing system.

Fair Share Scheduling class uses CPU share instead of priorities to make scheduling decisions. CPU share indicates right to available CPU resources and are allocated to a set of processes (known as project).

Time Slice

Q4. Explain Time Slice.

Ans. Another possibility is to time slice among the queues.

A short interval of time allotted to each user or program in a multitasking or timesharing system. Time slices are typically in milliseconds.

The scheduler is run once every time slices to choose the next process to run. If the time slice is too short then the scheduler will consume too much processing time but if it is too long then processes may not be able to respond to external events quickly enough.

Fixed Priority Scheduling

Q3. Explain Fixed Priority Scheduling.

Ans. Fixed priority scheduling, (that is, serve all from foreground then from background). This may cause the possibility of starvation.

Let us take an example with five queues:

  1. System Processes
  2. Interactive Processes
  3. Interactive Editing Processes
  4. Batch Processes
  5. Student Processes

Each queue has absolute priority over lower priority queue. No process in the lower priority queue could run unless the queues for higher priority systems were all empty. Like, if an interactive process entered the ready queue while a batch process was running, the batch process would be preempted.

Multilevel Queue Scheduling

Figure: Multilevel Queue Scheduling

Types of Scheduling Between Queues

Q2. What kind of scheduling must be done between queues?

Ans. Scheduling must be done between the queues, which are commonly implemented as fixed priority preemptive scheduling.

  1. Fixed Priority Scheduling
  2. Time Slice

Explain Multilevel Queue Scheduling

Q1. Explain Multilevel Queue Scheduling.

Ans. This algorithm is created for situation in which processes are easily classified into different groups. Ready queue is partitioned into separate queues and each queue has separate queues and each queue has its own scheduling algorithm.

For example, separate queues might be used for:

  1. Foreground (interactive) processes: Round Robin
  2. Background (batch) processes: FCFS

These two types of processes have different response time requirements and so may have different scheduling needs. The processes are permanently assigned to one queue, generally based on some property of the processes, such as memory size, process priority or process type.

Multilevel Queue Scheduling

Q1. Explain Multilevel Queue Scheduling.

Q2. What kind of scheduling must be done between queues?

Q3. Explain Fixed Priority Scheduling.

Q4. Explain Time Slice.