Lecture 10 - Scheduling

We talked a lot about running along until we block, then pick who gets to run, but how is this done?

Process States

Remember at any time we have one of 3 process states:

We have the difference between a policy and a mechanism:

Process Types

There's two types of process types:

Scheduling is mandatory in two cases:

  1. When a process exits
  2. When a process blocks

Scheduling Criteria

It might be desirable under a few other conditions:

  1. When a new process is created
  2. When an IO interrupt occurs
  3. When a timer interrupt occurs

What makes a good algorithm?

Examples of Non-Preemptive Scheduling

For instance FCFS; first-come-first served. You do the shortest job first:

This is the bubble-sort method of organizing jobs.

Another example is round-robin.