Let’s say you don’t have unlimited resources. Be it RAM, access to files, CPU slots, whatever you can think of. And then you have multiple workloads that will need said resources.

That’s where scheduling comes in. Scheduling comes in MANY shapes and sizes including ones you haven’t even suspected of.

Scheduler types

Here we explore the various scheduler algorithms that deal with scheduling tasks. Keep in mind I also tried to unify the terminology used so a task forms a unit of work that scheduler schedules. This doesn’t always align directly so please take note.

NameOverheadReal timeStarvationRT BCRT WCIntroducedRead more
Round Robin๐Ÿ˜๐Ÿ™๐Ÿ™‚๐Ÿ™‚๐Ÿ™‚1950shere
First come, first served๐Ÿ™‚๐Ÿ™๐Ÿ™‚๐Ÿ™‚๐Ÿ™1950shere
Manual scheduling๐Ÿ™‚๐Ÿ™‚๐Ÿ˜๐Ÿ˜๐Ÿ˜โˆžhere
Priority earliest deadline first๐Ÿ˜๐Ÿ™‚๐Ÿ™‚๐Ÿ˜๐Ÿ˜1950shere
Shortest remaining time first๐Ÿ˜๐Ÿ™๐Ÿ˜๐Ÿ™‚๐Ÿ™1960shere
Fixed priority pre-emptive๐Ÿ™‚๐Ÿ™‚๐Ÿ˜๐Ÿ™‚๐Ÿ™1980shere
Multilevel queue๐Ÿ™‚๐Ÿ™๐Ÿ˜๐Ÿ˜๐Ÿ˜1950shere
Work-conserving๐Ÿ™‚๐Ÿ™๐Ÿ˜๐Ÿ™‚๐Ÿ™1960shere

Legend:

  • Overhead - how much time we waste running the scheduling algorithm itself, switching tasks, etc.
  • Real time - is the algorithm suitable for real time systems
  • Starvation - is the algorithm prone to starving tasks in certain conditions
  • RT BC - response time to schedule a task (best case)
  • RT WC - response time to schedule a task (worst case)
  • Introduced - year it was first introduced
  • Introduced by - author/organization that introduced it
  • Type - scheduling algorithm type

  • ๐Ÿ™‚ - good; does well in all or almost all situations.
  • ๐Ÿ˜ - neutral/average; is generally ok, but might do poorly in certain scenarios.
  • ๐Ÿ™ - bad; does poorly, probable huge delays, etc.

Implementations

Some of the more prominent and well documented example implementations of scheduler algorithms.

NameTypeIntroducedIntroduced byRead more
Completely Fair Schedulerweighted fair queuing2000sIngo Molnรกr/Linuxhere
Brain Fuck Schedulerweighted round-robin2000sCon Kolivas/Linuxhere
React schedulerN/A2010sFacebookhere
Google maps schedulerN/A2000sGooglehere
Windows XP/etc.multilevel feedback queue2000sMicrosofthere
MS-DOSno scheduler1980sMicrosofthere

Closing notes

As you can see schedulers are used all over the place in the software world and knowing something about them helps in solving multi-workload problems quicker and with much less hassle.

And remember evaluating schedulers is a context dependent task so take all this info with a grain of salt and do your homework.