Exercise 4
CPU scheduling
Process Burst time ------- ---------- P1 10 P2 1 P3 2 P4 1 P5 5
The processes are assumed to have arrived in the order P1,P2,P3,P4,P5,
all at time 0.
Draw two Gantt charts illustrating the execution of these processes using FCFS and a nonpreemptive SJF scheduling.
Calculate waiting times and turnaround times for each process, and the average waiting times and average turnaround times for both schedulings.
Process Arrival time Burst time ------- ------------ ---------- P1 0 10 P2 2 1 P3 3 2 P4 4 1 P5 6 5
Draw two Gantt charts illustrating the execution of these processes using nonpreemptive SJF and preemptive SJF scheduling.
Calculate waiting times and turnaround times for each process, and the average waiting times and average turnaround times for both schedulings. Remember to substract the arrival times of the processes in waiting time and turnaround time calculations.
Process Burst time Priority ------- ---------- -------- P1 10 3 P2 1 1 P3 2 3 P4 1 4 P5 5 2
The processes are assumed to have arrived in the order
P1,P2,P3,P4,P5,
all at time 0.
Draw a Gantt chart illustrating the execution of these processes using a priority scheduling. (Use FCFS for equal priority processes)
Calculate waiting times and turnaround times for each process, and the average waiting time and average turnaround time for this scheduling.
Process Arrival time Burst time ------- ------------ ---------- P1 0.0 8 P2 0.4 4 P3 1.0 1Draw two Gantt charts illustrating the execution of these processes using FCFS and a nonpreemptive SJF scheduling.
Calculate waiting times and turnaround times for each process, and the average waiting times and average turnaround times for both schedulings.
Draw a Gantt chart for scheduling.
Calculate waiting times and turnaround times for each process, and the average waiting time and average turnaround time for this scheduling.