1 / 12

Lecture 11 Uniprocessor Scheduling

Lecture 11 Uniprocessor Scheduling. 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. Short-term Scheduling Criteria User-oriented. Response Time

sheila
Download Presentation

Lecture 11 Uniprocessor Scheduling

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. 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 M.B. Ibáñez

  3. Short-term Scheduling CriteriaUser-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 M.B. Ibáñez

  4. 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 M.B. Ibáñez

  5. 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 Decision Mode M.B. Ibáñez

  6. 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 M.B. Ibáñez

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

  8. 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. M.B. Ibáñez

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

  10. 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 M.B. Ibáñez

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

  12. 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 M.B. Ibáñez

More Related