Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider the following set of processes, with the length of the CPU burst given

ID: 3587935 • Letter: C

Question

Consider the following set of processes, with the length of the CPU burst given in milliseconds: Arrival time CPU Burst time Process P1 P2 Priori 2 4 2 0 10 P4 P5 10 (a) Draw six Gantt charts that illustrate the execution of these processes using the following scheduling algorithms: FCFS, SJF, SRTF, RR (quantum 1), and RR (quantum-3), and non-preemptive priority (a smaller priority number implies a higher priority). (3 points) (b) What is the turnaround time of each process for each of the scheduling algorithm in part (a)? (1 point) (c) What is the waiting time of each process for each of the scheduling algorithm:s in part (a)? (1 point)

Explanation / Answer

FCFS:

0                         10                       11                       14                         21                  23

Turnaround Time = Completion time - Arrival Time

                              = 10+10+11+15+13 is 59

SJF:

0                         1                         3                         6                         13                     23

SRTF:

0           1            2           3            6             10        12         15          23

RR-Quantum-1:

0   1    2     3    4    5    6    7    8    9  10  11  12  13 14 15 16 17 18  19 20 21 22 23


RR-Quantum-3:

0    3    4    6    9    12   14 15 18   21 22   23

Non preemtive :

0                    10                         17                       18                       21                      23

Turn around Time=10+11+8+18+22

FCFS:

P1 P2 P3 P4 P5

0                         10                       11                       14                         21                  23

Turnaround Time = Completion time - Arrival Time

                              = 10+10+11+15+13 is 59

SJF:

P2 P5 P3 P4 P1

0                         1                         3                         6                         13                     23

SRTF:

P1 P2 P1 P3 P4 P5 P4 P1

0           1            2           3            6             10        12         15          23

RR-Quantum-1:

P1   P2 P1 P3 P1 P3 P4 P1 P3 P4 P5 P1 P4 P5 P1 P4 P1 P4 P1 P4 P1 P4 P1

0   1    2     3    4    5    6    7    8    9  10  11  12  13 14 15 16 17 18  19 20 21 22 23


RR-Quantum-3:

P1 P2 P3 P4 P1 P5 P3 P4 P1 P4 P1

0    3    4    6    9    12   14 15 18   21 22   23

Non preemtive :

P1 P4 P5 P3 P2

0                    10                         17                       18                       21                      23

Turn around Time=10+11+8+18+22