Presentation is loading. Please wait.

Presentation is loading. Please wait.

Fall 2000M.B. Ibáñez Lecture 11 Uniprocessor Scheduling.

Similar presentations


Presentation on theme: "Fall 2000M.B. Ibáñez Lecture 11 Uniprocessor Scheduling."— Presentation transcript:

1 Fall 2000M.B. Ibáñez Lecture 11 Uniprocessor Scheduling

2 Fall 2000M.B. Ibáñez Types of Scheduling Long-term –performed when new process is created Medium-term –Swap-in, swap-out processes to/from main memory Short-term –which ready process to execute next

3 Fall 2000M.B. Ibáñez Short-term Scheduling Criteria User-oriented Response Time –Elapsed time between the submission of a request until there is output. Turnaround time –How long it takes to execute a process

4 Fall 2000M.B. Ibáñez Short-term Scheduling Criteria System-oriented CPU utilization –We want to keep the CPU as busy as possible Throughput –Maximize the number of processes completed per unit time

5 Fall 2000M.B. Ibáñez Decision Mode Nonpreemptive –Once a process is in the running state, it will continue until it terminates or blocks itself for I/O Preemptive –Currently running process may be interrupted and moved to the Ready state by the operating system –Allows for better service since any one process cannot monopolize the processor for very long

6 Fall 2000M.B. Ibáñez First-Come, First Served Scheduling As each process becomes ready, it joins the ready queue When the current process ceases to execute, the oldest process in the Ready queue is selected

7 Fall 2000M.B. Ibáñez FCFS example

8 Fall 2000M.B. Ibáñez FCFC evaluation Performs much better for long processes than short ones The turnaround time for short processes can be high It tends to favor processor-bound processes over I/O-bound processes It is not an attractive alternative on its own for single- processor system. However, it is often combined with a priority scheme to provide an effective scheduling.

9 Fall 2000M.B. Ibáñez Shortest-job-first scheduling -nonpreemptive- The process with the shortest expected processing time is selected next

10 Fall 2000M.B. Ibáñez Shortest-job-first scheduling -nonpreemptive- comments It needs to know or at least estimate the required processing time of each process A risk with this policy is the possibility of starvation for longer processes, as long as there is a steady supply of shorter processes

11 Fall 2000M.B. Ibáñez Shortest-job-first scheduling -preemptive- The scheduler always chooses the process that has the shortest expected remaining processing time

12 Fall 2000M.B. Ibáñez Shortest-job-first scheduling -preemptive- Comments There is a risk of starvation of longer processes Short jobs are given immediate preference to a running longer job


Download ppt "Fall 2000M.B. Ibáñez Lecture 11 Uniprocessor Scheduling."

Similar presentations


Ads by Google