25,893 views
73 73 votes

Consider an arbitrary set of CPU-bound processes with unequal CPU burst lengths submitted at the same time to a computer system. Which one of the following process scheduling algorithms would minimize the average waiting time in the ready queue?

  1. Shortest remaining time first
  2. Round-robin with the time quantum less than the shortest CPU burst 
  3. Uniform random
  4. Highest priority first with priority proportional to CPU burst length

8 Answers

Best answer
79 79 votes

Answer should be (A) SRTF
SJF minimizes average waiting time. Probably optimal.
Now, here as all processes arrive at the same time, SRTF would be same as SJF. and hence, the answer.

Reference: http://www.cs.columbia.edu/~junfeng/10sp-w4118/lectures/l13-sched.pdf See Slide 16,17 and 23

• edited by
17 17 votes
Turnaround time is the total time taken by the process between starting and the completion and waiting time is the time for which process is ready to run but not executed by CPU scheduler. As we know, in all CPU Scheduling algorithms, shortest job first is optimal i.ie. it gives minimum turn round time, minimum average waiting time and high throughput and the most important thing is that shortest remaining time first is the pre-emptive version of shortest job first. shortest remaining time first scheduling algorithm may lead to starvation because If the short processes are added to the cpu scheduler continuously then the currently running process will never be able to execute as they will get pre-empted but here all the processes are arrived at same time so there will be no issue such as starvation. So, the answer is Shortest remaining time first, which is answer (A).
2 flags:
✌ Edit necessary (GEETANJALI_AWASTHI)
5 5 votes

If we take arbitrary set of CPU-bound processes with unequal CPU burst lengths

Process Burst Time
P1 2
P2 3
P3 4
P4 5



Average waiting of SRTF : (0+2+5+9)/4 = 4

Average waiting of RR(1 ms QT) : (3+6+8+9)/4 = 6.5

Average waiting of Highest priority : (0+5+9+12)/4 = 6.5

Answer : Option A

2 2 votes
Shortest remaining time first is optimal. For any scheduling scenario where response time is not a metric of concern, there is no better algorithm than SRTF. SRTF produces the best average waiting time, completion time and turnaround times.
1 1 vote
Ans should be srtf but because in srtf their may be possibility of starvation so answer is round robin.
3 flags:
✌ Edit necessary (zgod)
✌ Edit necessary (Arkadeep_Das “Wrong answer”)
✌ Edit necessary (Vignan)
Answer:
Position:
Show:

Related questions

67 67 votes
6 answers 6 answers
32.9k
32.9k views
Sandeep Singh asked Feb 12, 2016
32,884 views
Cylinder a disk queue with requests for $I/O$ to blocks on cylinders $47, 38, 121, 191, 87, 11, 92, 10.$ The C-LOOK scheduling algorithm is used. The head is initially at...
110 110 votes
9 answers 9 answers
34.7k
34.7k views
Sandeep Singh asked Feb 12, 2016
34,690 views
Consider a computer system with ten physical page frames. The system is provided with an access sequence $(a_{1}, a_{2},....,a_{20}, a_{1}, a_{2},...a_{20})$, where each ...
67 67 votes
6 answers 6 answers
28.8k
28.8k views
Sandeep Singh asked Feb 12, 2016
28,762 views
Consider the transition diagram of a PDA given below with input alphabet $\Sigma=\{a,b\}$ and stack alphabet $\Gamma = \{X,Z\}$. $Z$ is the initial stack symbol. Let $L$ ...
92 92 votes
10 answers 10 answers
39.7k
39.7k views
Sandeep Singh asked Feb 12, 2016
39,722 views
Consider the weighted undirected graph with $4$ vertices, where the weight of edge $\{i,j\}$ is given by the entry $W_{ij}$ in the matrix $W$. W=$\begin{bmatrix} 0&2 &8 &...