Presentation is loading. Please wait.

Presentation is loading. Please wait.

Day 25 Uniprocessor scheduling

Similar presentations


Presentation on theme: "Day 25 Uniprocessor scheduling"— Presentation transcript:

1 Day 25 Uniprocessor scheduling

2 Shortest Remaining Time(SRT)
Pre-emptive version of SPN. Invoke when a new process enters the system and when the current process voluntarily releases the processor. Better response time as short jobs given immediate preference. Fewer process switches than Round Robin. Must keep track of elapsed time.

3 Process Scheduling Example

4 Round robin Pre-empt a process using the clock interrupt.
A process is allowed to run for a time-slice or quantum. The next process in the Ready queue is selected to run following the pre-emption (FCFS). Prevents large processes from monopolizing the processor.

5 Round robin Design issue: length of quantum Short quantum
short processes will finish quickly. lots of process switches Choose such that typical processes can complete without being interrupted.

6 Round robin Unfair to I/O-bound processes as they will typically not use a complete quantum, while CPU-bound processes will. Use Virtual Round Robin Use an auxiliary queue to hold processes that have I/O requests serviced. Process in auxiliary queue gets preference over those in the main ready queue. Process from the auxiliary runs for time remaining from last time-slice.

7

8 Process Scheduling Example

9 Highest Response Ratio Next (HRRN)
w – time spent waiting for the processor s – expected service time

10 HRRN Non-pre-emptive Select the process that has the highest response ratio. Short process (small “s”) given preference. Long process(large “s”) that has been waiting a long time (large “w”) is given preference. Accounts for age of process. Must estimate “s”.

11 Process Scheduling Example

12 Multi-level Feedback (quantum = i)
Pre-emptive (time quantum) Maintain many ready queues of varying priority. Each queue uses FCFS. A process that is pre-empted is moved to a queue of lower priority to wait. Thus longer processes are penalized. Don’t have to estimate running time. Note: If there are no processes waiting, don’t pre-empt the process

13

14 Process Scheduling Example

15 Multi-level Feedback (quantum = 2i * quantum)
With quantum = i, long processes will have very high turn-around time. So, a process in queue RQi will be allowed to run for 2i * quantum.

16 Fair-Share Scheduling
Treat multiple processes and threads of a user as a collection. The performance of the collection of threads is optimized not just that of any one thread or process. Fair share scheduling ensures that users are given a fair share of the processor time.

17 FSS Divide user community into groups.
Each user process’ priority is based on the process’ execution time and the execution time of processes within the same group.


Download ppt "Day 25 Uniprocessor scheduling"

Similar presentations


Ads by Google