edited by
19,129 views
42 votes
42 votes

For the processes listed in the following table, which of the following scheduling schemes will give the lowest average turnaround time?$$\small \begin{array}{|c|c|c|} \hline \textbf{Process} & \textbf{Arrival Time} & \textbf{Process Time}\\\hline \text{A} & 0 & 3 \\\hline \text{B} & 1 & 6  \\\hline \text{C} & 4 & 4 \\\hline \text{D} & 6 & 2 \\\hline  \end{array}$$

  1. First Come First Serve
  2. Non-preemptive Shortest job first
  3. Shortest Remaining Time
  4. Round Robin with Quantum value two
edited by

5 Answers

0 votes
0 votes

Directly Answer:

SRTF is the pre-emptive version of SJF which will always give the minimal wait time. So directly answer C.

Why SJF is Optimal?

Consider two processes

  Execution Time
P1 2
P2 5

 

if P1 executes first,

$\Rightarrow$ P2 will have to wait till P1 Completes

$\Rightarrow$ That is 2 unit of time.

if P2 executes first,

$\Rightarrow$ P1 will have to wait till P2 Completes

$\Rightarrow$ That is 5 unit of time.

Better to execute shortest ones first so that others will have to wait till shorter execution times

 

Answer:

Related questions

35 votes
35 votes
6 answers
5
go_editor asked Feb 14, 2015
30,526 views
The maximum number of processes that can be in $\textit{Ready}$ state for a computer system with $n$ CPUs is :$n$$n^2$$2^n$Independent of $n$
69 votes
69 votes
6 answers
7
go_editor asked Feb 14, 2015
20,896 views
Two processes $X$ and $Y$ need to access a critical section. Consider the following synchronization construct used by both the processes$$\begin{array}{|l|l|}\hline \text...