Getting to Run: Process Scheduling

Just as the operating system needs to decide the order in which I/O tasks occur on an I/O device, it also needs to decide the order in which processes run on a CPU. Such a decision is called process scheduling, and it is made by the process scheduler software of the OS. The reason that the OS needs to make this decision is that only one process can run on a single CPU at any given time.

On devices that have multiple CPUs, several programs can run in parallel (each on one CPU.)

The ultimate purposes of performing process scheduling are:

  1. To ensure that the CPU is always busy (that some program runs on the CPU at any given moment.)
  2. To allow the running processes to provide responses to users within a reasonable time (imagine the insanity of waiting for 2 hours for your Java program to run just because a high-quality computer game is also running.)