in Operating System
563 views
0 votes
0 votes
True/False

SJF and SRTF both suffer from Convoy effect.

please tell reason.
in Operating System
563 views

4 Comments

@Rock 01 no no,

Suppose a process comes at $t=1$ with burst time $1000$, and then many process with burst time $1$ comes at $t=2$, so now all these process have to wait before this bigger process finishes, in $SJF$.

So, there is convoy effect.

2
2
Exactly !
0
0

  right,thanks

0
0

1 Answer

2 votes
2 votes
Convoy effect is when a smaller process gets starved because a bigger process came before it. This is especially observed in FCFS scheduling. But this can be found in SJF as well, this is because SJF is nonpreemptive suppose a scenario that a process P1 with BT as 100 came at Time 1. Then at Time 2 another process P2 with BT as 5 came. Since at Time 1 P1 was the shortest, it will be scheduled, because of which P2 will have to wait till time 2. Thus leading to CONVOY EFFECT.
This won't be the case with SRTF as at Time 2 P2 will be scheduled and then only the longer job P1 will continue executing.
PS: If your doubt was resolved, please consider upvoting!
edited by

2 Comments

why are using word Starvation?
0
0
I've updated the answer !
0
0