180 views

1 Answer

0 0 votes

The convoy effect is most commonly associated with FCFS, because FCFS can place a long CPU-bound process before many short processes.

SJF usually reduces the convoy effect because it chooses the shortest job first. However, since SJF is non-preemptive, a long process that has already started can still cause short processes arriving afterward to wait.

SJF does not know the exact future CPU burst time

SJF stands for Shortest Job First. To choose the shortest job, the scheduler needs to know or estimate how long each process will run.

But in a real system, the scheduler generally cannot know the future CPU burst time exactly.

So SJF uses an estimate of the next CPU burst, often based on previous CPU bursts.

SJF:

  • Non-preemptive scheduling
  • Selects the process with the shortest CPU burst time
  • Once a process starts executing, it cannot be interrupted by another process.

SRTF (Shortest Remaining Time First):

  • Preemptive version of SJF
  • If a new process arrives with a shorter remaining burst time, the currently running process can be preempted.
Position:
Show:

Related questions

0 0 votes
2 2 answers
1.7k
1.7k views
Na462 asked Jul 12, 2018
1,738 views
1 1 vote
0 0 answers
5.7k
5.7k views
iarnav asked Jul 11, 2018
5,731 views
Let's say we have two CPU scheduling algorithm as SJF and SRTF and we have a arbitrary pool/set of processes with different ARRIVAL TIME and CPU BURST, then what CPU sch...
1 1 vote
2 2 answers
1.9k
1.9k views
Purple asked Jan 13, 2017
1,896 views
Calculate the Exponential averaging for the $\text{SJF}$ with $T_{1}=10,\alpha = 0.5$ and previous runs as $8,7,4,16$$\text{(Give the answer correct to one decimal place)...
0 0 votes
1 answers 1 answer
1.5k
1.5k views
rahul sharma 5 asked Dec 5, 2016
1,481 views
Please help me in understanding the followign formulae?Prediction of the Length of the Next CPU Burst Pn+1 = a tn +(1-a)Pn This formula defines a...