Whose turn, and who decides

The kernel handing out turns on a few cores to many programs. This lesson asks the question the drawing takes for granted: when several programs are waiting, which one goes next?
Before you start. The CPU is the chip that runs a program’s instructions; a core is one of several copies of that machinery inside it, each running one program at a time. The kernel is the one program with full access to the hardware, and its scheduler gives each running program a short turn on a core, then takes it back and gives the next one a turn (Processes, Threads & the Kernel). Every swap from one program to another costs a little time, because the core has to save one program’s place and load the next one’s.