Uniprocessor Scheduling III CPSC 410 Operating Systems Department of Physics, Computer Science and Engineering Christopher Newport University
Question (1) zConsider the following set of processes: Process Name Arrival Time Processing Time Perform the analysis of a comparison of scheduling policies: FCFS, RR(q=1), RR(q=4), SPN, SRT, HRRN, Feedback(q=1), and Feedback(q=2 i ).
P1 P2 P3 P
Solution of Question 3 - FCFS (3) * Each square represents one time unit. The number refers to the running process First Come First Served (FCFS) Process P i Average Arrival Time T a Service Time T s Finish Time T f Turnaround Time T q T q = T f - T a Normalized T q /T s Turnaround Time
P1 P2 P3 P
Solution of Question 3 – RR (q=1) (5) * Each square represents one time unit. The number refers to the running process Round Robin (RR q=1) Process P i Average Arrival Time T a Service Time T s Finish Time T f Turnaround Time T q T q = T f - T a Normalized T q /T s Turnaround Time
P1 P2 P3 P
Solution of Question 3 – RR (q=4) (7) * Each square represents one time unit. The number refers to the running process Round Robin (RR q=4) Process P i Average Arrival Time T a Service Time T s Finish Time T f Turnaround Time T q T q = T f - T a Normalized T q /T s Turnaround Time
P1 P2 P3 P
Solution of Question 3 - SPN (9) * Each square represents one time unit. The number refers to the running process Shortest Process Next (SPN) Process P i Average Arrival Time T a Service Time T s Finish Time T f Turnaround Time T q T q = T f - T a Normalized T q /T s Turnaround Time
P1 P2 P3 P
Solution of Question 3 - SRT (11) * Each square represents one time unit. The number refers to the running process Shortest Remaining Time (SRT) Process P i Average Arrival Time T a Service Time T s Finish Time T f Turnaround Time T q T q = T f - T a Normalized T q /T s Turnaround Time
P1 P2 P3 P
Solution of Question 3 - HRRN (13) * Each square represents one time unit. The number refers to the running process Highest Response Ratio Next (HRRN) Process P i Average Arrival Time T a Service Time T s Finish Time T f Turnaround Time T q T q = T f - T a Normalized T q /T s Turnaround Time
P1 P2 P3 P
Solution of Question 3 – FB q=1 (15) * Each square represents one time unit. The number refers to the running process Feedback (FB q=1) Process P i Average Arrival Time T a Service Time T s Finish Time T f Turnaround Time T q T q = T f - T a Normalized T q /T s Turnaround Time
P1 P2 P3 P
Solution of Question 3 – FB q=2 i (17) * Each square represents one time unit. The number refers to the running process Feedback (FB q=2 i ) Process P i Average Arrival Time T a Service Time T s Finish Time T f Turnaround Time T q T q = T f - T a Normalized T q /T s Turnaround Time
Question 2 - Exercise/Home Work (1) Five batch jobs, A through E, arrive at a computer center at essentially the same time. They have an estimated running time of 15, 9, 3, 6, and 12 minutes, respectively. Their (externally defined) priorities are 4, 7, 3, 1, and 6, respectively, with 10 being the highest priority. For each of the following scheduling algorithms, determine the turnaround time for each process and the average turnaround for all job. Ignore process switching overhead. In the last three cases, assume that only one job at a time runs until it finishes and that all jobs are completely processor-bound. (a) priority scheduling (b) FCFS (run in order 15, 9, 3, 6, and 12) (c) shortest job first.