In: Computer Science
6.1)
Consider 3 processes, P1, P2, and P3, all available at time 2, 0, 3, respectively, with the CPU bursts as 6, 9, and 4, respectively, what would be the turnaround time for each of the processes and what would be the average turnaround time for those 3 processes if SJF (Shortest Job First) CPU scheduling algorithm were used? (5 points)
6.2)
Based on the same scenario given in the previous question, what would be the turnaround time for each of the processes and what would be the average turnaround time for those 3 processes if RR (Round-Robin) CPU scheduling algorithm with time quantum at 3 were used?
Solution:
Explanation:
=>In SJF alogithm the job which has least busrt time will be executed first if it is available, the job which has largest burst time will be executed at the last.
=>In Round Robin algorithm jobs are executed based on the time quantum.
I have explained each and every part with the help of statements as well as image attached to the answer above.