Scheduling and the real world

So far we've talked about scheduling policies and thread states, but we haven't said much yet about why and when things are rescheduled. There's a common misconception that rescheduling just occurs, without any real causes. Actually, this is a useful abstraction during design! But it's important to understand the conditions that cause rescheduling. Recall the diagram Scheduling roadmap (in the The kernel's role section).

Rescheduling occurs only because of:

  • a hardware interrupt
  • a kernel call
  • a fault