Comp354 Ex2
Comp354 Ex2
• You will gain experience in deriving Gantt charts for various CPU
scheduling algorithms
2 Exercises Description
1. What is an operating system? Is there a clear precise definition?
5. Give two reasons why caches are useful. What problems do they solve?
What problems do they cause?
(a) Draw four Gantt charts that illustrate the execution of these
processes using the following scheduling algorithms: FCFS, SJF,
COMP–354 Operating Systems Exercise Set 2 3
14. Consider Table 2 that illustrates a set of processes, with the length of
the CPU burst and arrival times given in milliseconds.
(a) Draw four Gantt charts that illustrate the execution of these pro-
cesses using the following scheduling algorithms: FCFS, preemp-
tive SJF, preemptive priority (a smaller priority number implies
a higher priority), and RR (quantum = 1);
(b) What is the turnaround time of each process for each of the
scheduling algorithms in part a?
(c) What is the waiting time for each process for each of the schedul-
ing algorithms in part a?
(d) Which of the algorithms in part a results in the minimum average
waiting time (over all processes)?