Draw four Gantt charts illustrating the execution of these processes using FCFS, SRTN, SJF and Round Robin (quantum=2) scheduling.
FCFS (First-Come, First-Served) Scheduling:
Assume we have four processes P1, P2, P3, and P4, with the following execution times:
P1: 8 units
P2: 4 units
P3: 9 units
P4: 5 units
The Gantt chart for FCFS scheduling would look like:
| P1 | P2 | P3 | P4 |
0 8 12 21 26
SRTN (Shortest Remaining Time Next) Scheduling:
Assuming the same four processes with their execution times mentioned above, the Gantt chart for SRTN scheduling would be:
| P2 | P4 | P1 | _________ _______ ____ __________ ______ ___.
_______ ________ ___ ______ _____ _____.
______ _______ ____ ______ ____ ____ ________ __________ ___.
__________ _______ _______ ______ _________ _________.
______ ________ ____ ______ ______ ________ __________.
___ ____ ___ ____ _________ _____ __________ __________ ______ _________ _________.
__________ ____ ____ ____ ___.
___ __________ ______ ___ __________ _____ ___ ________ ___.
_______ _____ ______ _______ ___ _____ ___ _____ ________ ____.
______ ________ ___ ___ ____ ___ _____ ____ __________ __________ ______.
__________ __________ _________ ________ ______ _____.
____ ______ ________ _______ _______ _____ __________ _______ _______.
____ _____ ______ ___ ____ ________ ___ ___ ___ ______ ________.
_________ _____ _____ ________ __________ __________.
__________ _____ _______ ______ _______ _________ __________ __________.
______ ______ ___ ________ ____ _____ ______ _______ ________ ___.
__________ ____ ______ ______ _________ ___ __________ ______ _____ _________ ________ _______.
____ _________ ___ __________ _________ ___.
_______ _____ ___ _________ _________ ________ __________ ___ __________ __________.
____ ______ _______ _____ ____ _______ ____ _____ ______.
___ _______ _____ ____ ______ _________ ___ ___ __________.
____ __________ ______ _________ __________.
________ _________ _________ ___ ___ _________ ___ ___ _________ ____.
________ _______ ________ __________ ______ __________ ________.
_________ ________ ___ ____ ________ ______ ___ ________ _____ ______ ___.
_____ ___ ______ ___ ______.
____ _______ ____ ___ _______ __________ __________ ___.
___ ______ ___ _____ _________ _________ _______ ________ ____ ___ ____.
_________ __________ ____ _____ ____ ____ _____ _____ _________.
___ ______ ____ _______ ____ ____.
_____ ________ __________ _________ ________ ___ ____ ______ _____ ______.
___ _____ ___ ______ ____ ___ _________ ______ __________ __________ _______ _______.
_________ ___ _________ ____ _________ ________ __________ ____.
_________ ____ _________ ________ __________ __________ __________ ______.
________ ____ ____ _________ _______ ________ _______ ______ ____ _______ ______ ______.
______ ____.
Get Full Answer on WhatsApp