Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Question (10 Marks)

Consider the following set of processes, with the length of the CPU-burst time in
milliseconds is shown in the following Table:

Process ID Burst Time(ms)


P0 12
P1 2
P2 3
P3 2
P4 6

1) Draw four Gantt charts that illustrate the execution of these processes using the
following scheduling algorithms:
o FCFS,
o SJF,
o RR (quantum = 5ms).
o Priority (lower priority).

Process ID Burst Time(ms) Priority


P0 12 3
P1 2 1
P2 3 3
P3 2 4
P4 6 2

…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………

2) What is the turnaround time of each process for each of the


scheduling algorithms?

Process ID Turnaround Time(ms)


FCFS SJF RR Priority
Scheduling
P0
P1
P2
P3
P4
Average
Turnaround
Time

3) What is the waiting time of each process for each of these scheduling algorithms?
Process ID Waiting Time(ms)
FCFS SJF RR Priority
Scheduling
P0
P1
P2
P3
P4
Average
Waiting
Time

You might also like