What happens when a processor is tasked with a process?
A single processor can only run a single process at a time. When a processor is tasked with multiple processes simultaneously, the operating system must have the ability to share the processor cycles between its processes.
Depending on the needs of the operating system, this may be accomplished efficiently using many different algorithms.
Scheduling algorithms must take certain goals into account. Some of the goals that all scheduling algorithms should aim for, as described by Tanenbaum and Woodhull, are fairness to each process and keeping the computer as busy as possible when there is work to be done.
There are also multiple criteria to consider for different types of systems. In systems which interact with the user, the user should receive a response to his/her requests as quickly as possible. In a realtime system, the scheduler must also ensure that deadlines are met on time (Tanenbaum and Woodhull, 2006, p. 97). As an example of meeting deadlines, processes which decode digital music must be able to do so quickly or else the music will sound choppy.