Professional Documents
Culture Documents
1. Consider the following set of processes, with the arrival times and the length of the
CPU‐burst times given in milliseconds, and the priorities given so that smaller priority
number means a higher priority.
a) Draw Gantt charts illustrating the execution of these processes using the following
scheduling algorithm:
(1) FCFS
(2) non-preemptive SJF
(3) preemptive SJF
(4) non-preemptive priority
(5) preemptive priority
(6) Round Robin (TQ = 6).
b) Calculate the average waiting time when using each of the above scheduling
algorithms.
c) Calculate the average turnaround time when using each of the above scheduling
algorithms.
Ans:
(1) FCFS
P1 P2 P3 P4 P5 P6
0 10 18 30 34 49 57
P1 P4 P6 P2 P3 P5
0 10 14 22 30 45 57
D. Priority, because Priority scheduling allocates system resources to the activities that
require them the most, while starving the programs that aren't high on the priority list.
Republic of the Philippines
Laguna State Polytechnic University
Province of Laguna