Exercise (5)
Exercise Assume the following jobs are executed with one processor, with the jobs arriving in the order listed in the table. Suppose a system uses RR scheduling with a quantum of 15. Create a Gantt chart illustrating these processes. What is the turnaround time for process p3? What is the average waiting time for processes? i t (pi) 80 1 20 2 10 3 4 50
Avg. waiting time of RR is: Turnaround time of process p3 with RR : t (pi) 80 1 20 2 10 3 4 50 p0 p1 p2 p3 p4 FCFS: SJN: Avg. waiting time of RR is: Turnaround time of process p3 with RR :
Exercise Assume the following jobs are executed with one processor, with the job arriving time listed in the table. Suppose a system uses preemptive SJN scheduling. Create a Gantt chart illustrating these processes. What is the turnaround time for process p3? What is the average waiting time for processes? i t (pi) Arrival time 80 1 20 10 2 30 3 35 4 50 40
Avg. waiting time of preemptive SJN is: t (pi) Arrival time 80 1 20 10 2 30 3 35 4 50 40 p0 p1 p2 p3 p4 FCFS: SJN: Avg. waiting time of preemptive SJN is: Turnaround time of process p3 with preemptive SJN: