Q1. Explain Fair Share Scheduling.
Ans. Solaris 9 introduced two new classes of scheduling:
- Fixed Priority
- 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).
Q3. What are the scheduling techniques used by Multilevel Feedback Queue Scheduling Algorithm?
Ans. The scheduling technique used by Multilevel Feedback Queue Scheduling Algorithm is:
- A new job enters queue Q0 that is served FCFS. When it gains CPU, job receives 8 milliseconds. If it does not finish in 8 milliseconds, job is moved to queue Q1.
- At Q1 job is again served FCFS and receives 16 additional milliseconds. If it still does not complete, it is preempted and moved to queue Q2.
- Several queues arranged in some priority order.
- Each queue could have a different scheduling discipline/ time quantum.
Figure: Multilevel Feedback Queue Scheduling
Q2. What are the parameters of Multilevel Feedback Queue Scheduler?
Ans. Multilevel feedback queue scheduler defined by the following parameters:
- Number of queues.
- Scheduling algorithm for each queue.
- Method used to determine when to upgrade a process.
- Method used to determine when to denote a process.
- Method used to determine which queue a process will enter when that process needs service.
Q1. Explain Multilevel Feedback Queue Scheduling.
Ans. Before multilevel feedback scheduling algorithm, we used only multilevel scheduling algorithm which was not so flexible, but this one uses separate queue for handling the processes, it automatically adjust the priority of the process. If the priority is high and the process will be allotted to lower priority queue, then automatically it can switch to the higher priority queue.
One queue may implement round robin algorithm the other may use first come fir serve algorithm, the allocation is based on the type of process, and that is, the process is either of CPU bound to I/O bound etc.
This type of scheduling allows the process to move between the various queues. The idea is to implement aging. The process that takes too much CPU time is assigned with lower priority queues, in addition to the process that waits too long for processing and is assigned to higher priority queues.
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.
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:
- System Processes
- Interactive Processes
- Interactive Editing Processes
- Batch Processes
- 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.
Figure: Multilevel Queue Scheduling
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.
- Fixed Priority Scheduling
- Time Slice
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:
- Foreground (interactive) processes: Round Robin
- 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.