UGC NET CS 2023System Software and Operating System › CPU SchedulingVerified
UGC NET CS 2023 PYQ: Consider the following table of arrival time and burst time for three processes $\text{P0,P1 P2}$: Process…
Consider the following table of arrival time and burst time for three processes $\text{P0,P1 P2}$:
| Process | arrival time | Burst time |
| $\text{P0}$ | $0 \mathrm{~ms}$ | 7 |
| $\text{P1}$ | $1 \mathrm{~ms}$ | 3 |
| $\text{P2}$ | $2 \mathrm{~ms}$ | 7 |
The pre-emptive shortest job first scheduling algorithm is used. Scheduling is carried out only at arrival or completion of a process. What is the average waiting time for the three processes?
- A$3 \mathrm{~ms}$
- B$3.67 \mathrm{~ms}$Correct answer
- C$4.47 \mathrm{~ms}$
- D$4 \mathrm{~ms}$
Answer
(B) $3.67 \mathrm{~ms}$
Approach
Simulate preemptive SJF (SRTF) and compute waiting times.
Reviewed by UGC IQ Editorial Team.