Consider the following set of processes, with the length of the CPU burst time given in milliseconds.
| Process | Burst time | Priority |
| P1 | 8 | 3 |
| P2 | 3 | 1 |
| P3 | 4 | 4 |
| P4 | 7 | 2 |
| P5 | 6 | 5 |
The processes are assumed to have arrived in the order P1, P2, P3, P4 and P5 and
all of them have arrived at time 0.
a. Draw corresponding Gantt charts illustrating the execution of these processes using FCFS, SJF, SRTN, Priority based scheduling/even-driven scheduling and Round Robin (quantum=2) scheduling algorithms.
b. What is the turnaround time of each process for each of the scheduling algorithm in (a)?
c. What is the waiting time of each process for each of the scheduling algorithm in (a)?
d. Which of the schedules in (a) results in minimal average waiting time (overall processes)?
a.
Here are the Gantt charts for each scheduling algorithm:
1. FCFS (First Come, First Served):
```
| P1 | P2 | P3 | P4 | P5 |
0 8 11 15 22 28
```
2. SJF (Shortest Job First):
```
| P2 | P3 | P1 | P5 | P4 |
0 3 7 15 21 28
```
3. SRTN (Shortest Remaining Time Next):
```
| P2 | P3 | P1 | P5 | P4 |
0 3 7 15 21 28
```
4. Priority Based Scheduling/Event-Driven Scheduling:
```
| P2 | P4 | P1 | P3 | P5 |
0 3 10 18 22 28
```
5. ________ _______ ___ _________ ___ ________ ____ _______ _______ _________ __________.
________ _________ __________ _______ ____ ________ _____.
__________ _____ ___ _____ _____ _____.
________ __________ _____ ___ __________ ______ _______.
_________ _______ _______ ________ ________.
______ _________ ___ ___ _____ ___ _______ _____ ____ _____ ______ ________.
________ _______ _______ ______ ____.
__________ _____ ______ __________ ___ ___ __________ ____ ________ _______ __________.
_______ ______ ______ ________ ____ ________ __________ ___ ________ _______ ____ _____.
__________ ______ ____ __________ ____ _______ ___.
_______ _____ ____ ___ __________ __________ ____ ________ _____ _________ _____ ____.
________ _________ __________ ____ ____ _________.
_____ ______ _______ _________ ____.
_________ _____ _______ _______ ____ ________ ________ __________.
__________ ____ ______ ______ ___ _______.
________ _________ _________ __________ ________.
__________ _______ ______ _______ _______ ___ __________ _______.
_____ _______ ____ ______ ____ ___ ____ ______.
_______ ________ ___ ______ ___.
__________ ________ ___ ______ ______ ________ ________ ________ _____ __________ _______.
__________ ___ _______ __________ ______ ________ ___ _____ ___.
________ __________ ___ ___ ______ __________ _________ ___ ________ _________ ______.
______ ____ _____ ____ ________.
_____ __________ ___ _____ __________ ___.
_________ _______ ____ ___ __________ ____ ______.
___ ________ _____ ___ _______ _______ _______.
_____ ___ ____ _________ ___ ________ __________ _____ _____ _____.
____ __________ _______ ______ ____ ____.
_______ _____ ___ ______ ________ _________ ________ ____ ____ _____.
______ _________ ________ ______ _________ _____ __________.
_______ _______ ___ _______ _____ _________ _______ ________ ______ _________.
________ __________ _____ _________ ____ ___ _________ _______.
______ ______ ________ _______ ______ _________ _______.
______ _____ ____ ______ ________ _________ ___.
____ ______ _________ _______ _____ ______ ______ ______ ___.
___ _______ ________ _______ ____ _______ _____ ____ __________ __________ ________.
___ __________ ________ __________ ________ _____ _______ _________.
______ _______ _______ _______ _______ _________ ________ ______ _______ ___ ____.
______ ____ _______ _______ _________ ______ _______ ______ ____ ______ ________.
_________ _______ _________ ____ ___ _____ ___ ______ ________ _____ ____ ___.
_______ ___ ______ ___ ______ __________ ________ _________ ______ ____ _________.
_____ __________ ___ ___ ____ _______ _________ _______ _______ _________.
__________ ________ _____ ___ ___ ___ ____ ______ ______ _______.
_____ _________ ______ ____ ____ ____ _______ _______ _____.
_________ ________ _____ _______ __________ __________ ____ _____ _________.
________ __________ ___ ________ ____ ______ ______ _________ ___ _____ ________.
_________ ____ __________ ____ _____ __________ ______ _______ ________ ____.
______ _____ __________ _________ ___ ________ ____ ______ ________ ___ ________.
_________ ______ _______ _______ __________.
______ ________ _______ _________ __________ ______ ____.
_____ ________ __________ __________ _____ ______ __________ __________.
_______ __________ __________ _____ _________ _______ ____ _________.
___.
Get Full Answer on WhatsApp