and what is the difference between convoy effect and starvation?
Convoy effect is slowing down of the whole operating system for some time because of few slow process But Starvation is the indefinite postponement of a process because it requires some resource before it can run, but the resource, though available for allocation, is never allocated to this process.
So we can say convoy effect is not related to starvation .
Convoy effect for a system and starvation is for a particular process ..so no relation between them.
convoy effect can occur in FCFS like suppose the first process which arrived in the queue has a huge burst time...so for that time all other processes will have to wait...this is convoy effect like a minister is crossing the road and all other traffic has to wait for some time....but it will not be infinte...all processes will eventually get a chance..
starvation is dying with hunger....dying without even getting a chance to get processed...if starvation is severe it can even lead to a deadlock kind of situation...and this can happen in all algos except FCFS and Round robin......like in SJF as u r not depending on arrival time....no matter at what time a process has arrived in the system u have to schedule the process with least burst time always.....so there is a chance that u scheduled one process P1 and before going to some other process say P2 which was just arrived after P1...some other process arrived with least burst time than P2..then u have to schedule that process...and what if it keeps on happening?...P2 will never be scheduled and gets starved....this is starvation...here m assuming that any no of process can arrive in the system because we have to think about the worst case..
Convey Effect: FCFS
Starvation: SJF/SRTF, Priority Scheduling, Multilevel queue scheduling