67.4k views
0 votes
Consider the following set of processes, the length of the CPU burst time given in milliseconds :

Process Burst time
P1 6
P2 8
P3 7
P4 3
iv) Assuming the above process being scheduled with the SJF scheduling algorithm :
a) The waiting time for process P3 is 3ms.
b) The waiting time for process P3 is 0ms.
c) The waiting time for process P3 is 16ms.
d) The waiting time for process P3 is 9ms.

1 Answer

3 votes

Final answer:

The waiting time for process P3 is 0ms.

Step-by-step explanation:

b. The waiting time for process P3 is 0ms.

The SJF (Shortest Job First) scheduling algorithm schedules the processes in order of their burst time, with the shortest burst time being executed first. In this case, process P4 has the shortest burst time of 3ms, followed by P1 with 6ms, P3 with 7ms, and P2 with 8ms. Since P3 has a shorter burst time than P2, it will be scheduled and executed before P2. Therefore, the waiting time for process P3 is 0ms.

User Shailaja Shah
by
8.5k points