1 / 12

Scheduling Algorithm

Scheduling Algorithm. Lecture on 29/01/2014 Prepared by : Karimgailiu R Panmei 11CS10020. Four types of Scheduling algorithm 1. First Come First Serve 2. Shortest Job First Scheduling 3. Priority Scheduling 4. Round Robin (RR). First Come First Serve(FCFS)

shima
Télécharger la présentation

Scheduling Algorithm

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. Scheduling Algorithm Lecture on 29/01/2014 Prepared by : Karimgailiu R Panmei 11CS10020

  2. Four types of Scheduling algorithm 1. First Come First Serve 2. Shortest Job First Scheduling 3. Priority Scheduling 4. Round Robin (RR)

  3. First Come First Serve(FCFS) Process that has been in ready queue for the longest time is selected for running Turnaround time (TAT): Total time that the item spends in the system TAT=waiting time + service time Normalized TAT = TAT : service time

  4. FCFS contd Performs better for long processes than short processes Favors processor-bound processes over I/O-bound processes Inefficiency use of the processor and I/O devices

  5. Shortest Job First(SJF) Scheduling Process with shortest expected processing time is selected next Non-preemptive Performance in terms of response time is better than FCFS Variability of response time is increased and hence reducing the predictability

  6. SJF contd Running average of each “burst” for each process : Sn+1=αTn+(1- α)Sn Where : Tn: processor execution time for nth process Sn+1 : Predicted value of (n+1) th instance α : constant weighted factor that determines the relative weight given to more recent or less recent observations 0<α<1

  7. Shortest Remaining Time(SRT) First Preemptive version of Shortest-Job-First The scheduler always chooses the process that has the shortest expected remaining processing time No additional interrupts are generated thus reducing overhead Bias in favor of longer processes found in FCFS is removed in SRT Risk of starvation of longer processes

  8. Round Robin Scheduling Also known as time slicing Each process is given an equal amount of time before being preempted Clock interrupt is generated at periodic intervals When interrupt occurs, the current process is placed back in ready queue and the next job is selected using FCFS

  9. Round Robin Scheduling contd Effective in general purpose time-sharing system or transaction processing system Processor-bound processes receives more CPU time than I/O bound processes resulting in its poor performances Inefficient use of I/O devices Increase in the variance of response time

  10. Priority Scheduling A priority is associated with each process CPU is allocated to the process having highest priority Equal-priority processes are scheduled in FCFS order The larger the CPU burst, the lower the priority Priority scheduling can be either pre -emptive or nonpreemptive

  11. Priority Scheduling contd Preemptivepriority scheduling algorithm : Preempt the CPU if the priority of the newly arrived process is higher than the priority of the currently running process. Non-preemptive priority scheduling algorithm : Simply put the new process at the head of the ready queue.

  12. Priority Scheduling contd Disadvantage : Indefinite blocking or starvation of process Processes with low priority can be left to wait indefinitely Solution : Aging Aging is a technique of gradually increasing the priority of processes that wait in the system for a long time.

More Related