For batch jobs require a programmers estimate if

This preview shows page 25 - 33 out of 93 pages.

For batch jobs, require a programmer’s estimate. If estimate is substantially off, system may abort job. In a production environment, the same jobs run frequently and statistics may be gathered. In an interactive environment, the operating system may keep a running average of each “burst” for each process. SPN could result in starvation of longer processes if there is a steady supply of short processes. Not suitable for time-sharing or transaction processing environment because of lack of preemption.
Image of page 25

Subscribe to view the full document.

BYU CS 345 Scheduling 26 Shortest Remaining Time (SRT) 0 5 10 15 20 1 2 3 4 5 Process Arrival Service 1 0 3 2 2 6 3 4 4 4 6 5 5 8 2
Image of page 26
BYU CS 345 Scheduling 27 Shortest Remaining Time The shortest remaining time (SRT) policy is a preemptive version of SPN. Must estimate expected remaining processing time When a new process joins the ready queue, it may have a shorter remaining time and preempts the current process. SRT does not bias in favor of long processes (as does FCFS) Unlike RR, no additional interrupts are generated reducing overhead. Superior turnaround performance to SPN, because a short job is given immediate preference to a running longer job.
Image of page 27

Subscribe to view the full document.

BYU CS 345 Scheduling 28 Highest Response Ratio Next (HRRN) time spent waiting + expected service time expected service time 1 2 3 4 5 0 5 10 15 20 Process Arrival Service 1 0 3 2 2 6 3 4 4 4 6 5 5 8 2
Image of page 28
BYU CS 345 Scheduling 29 Highest Response Ration Next Choose next process with the highest ratio Attractive approach to scheduling because it accounts for the age of a process. While shorter jobs are favored (a smaller denominator yields a larger ratio), aging without service increases the ratio so that a longer process will eventually get past competing shorter jobs.
Image of page 29

Subscribe to view the full document.

BYU CS 345 Scheduling 30 Feedback If we have no indication of the relative length of various processes, then SPN, SRT, and HRRN cannot be effectively used. ie. if we cannot focus on time remaining, focus on time spent in execution so far. Using feedback, we can give preference for shorter jobs by penalizing jobs that have been running longer. Feedback scheduling is done on a preemptive basis with a dynamic priority mechanism. A process is demoted to the next lower-priority queue each time it returns to the ready queue.
Image of page 30
BYU CS 345 Scheduling 31 Feedback (continued…) Within each queue, a simple FCFS mechanism is used except once in the lowest-priority queue, a process cannot go lower and is treated in a RR fashion. Longer processes gradually drift downward. Newer, shorter processes are favored over older, longer processes. Feedback scheduling can make turnaround time for longer processes intolerable. To avoid starvation, preemption time for lower- priority processes is usually longer.
Image of page 31

Subscribe to view the full document.

BYU CS 345 Scheduling 32 Comparisons Possible May favor I/O bound processes Can be high Not emphasized Not emphasized Preemptive (at time quantum) Adjustable Feedback NO Good balance Can be high Provides good response time High Non- preemptive
Image of page 32
Image of page 33
You've reached the end of this preview.
  • Winter '12
  • EricMercer
  • Scheduling algorithms, FCFS, BYU CS

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern