edited by
636 views
1 votes
1 votes

Consider a uniprocessor system with four processes having the following arrival and burst times:

$$\begin{array}{|c|c|c|l|} \hline&\text{Arrival Time}&\text{CPU Burst Time} \\ \hline P1&0&10\\P2&1&3\\P3&2.1&2\\P4&3.1&1 \\ \hline\end{array}$$

  1. Calculate the average waiting time and also the average turnaround time if shortest (remaining) job first (SJF) scheduling policy is used with pre-emption. Assume that the context switching time is zero. Note that in SJF, if at any point there is a tie, then the job that arrived earlier will get priority.
  2. Now consider the continuous arrival of new jobs at times $4, 5, 6, 7, \dots $ following $P4$, with CPU burst times of $2$ units each. In this case, what will be the turnaround time of $P1$? Justify your answer
edited by

1 Answer

1 votes
1 votes
TAT=3.5 ms and WT is =1.5 ms

time from (0-4) is not counted in calucation as it assumed that cpu is doing some other work

Related questions