Practice scheduling exercises

Consider the following processes:

Process CPU Burst Arrival Time
P0 2 0
P1 10 1
P2 6 5
P3 3 7
  1. FCFS

    • Draw a Gantt chart illustrating the execution of these processes using the FCFS scheduling algorithm. (4 points)
    • What is the average process turnaround time? (2 points)
    • What is the average process waiting time? (2 points)
  2. Preemptive SJF

    • Repeat question 1 (all parts) using the preemptive shortest job first (SJF) scheduling algorithm.
  3. Round Robin

    • Repeat question 1 (all parts) using the round robin scheduling algorithm with a time quantum $q=3$.
    • Note that in the event that a process completes its time quantum at the same time that another process arrives, the process just completing its quantum is queued /ahead/ of the arriving process.