Interrupts are passed up from the hardware into the OS. The OS then must decide what to do and may need to pause what its doing. If the user was currently writing a letter when a hardware failure occurred, the OS must stop the user and tell them what has happened. The error handling module must be given some CPU time and then the error module should pop up a dialog. We effectively have two processes competing for CPU time. The OS clearly gives priority to the error module, but this is not always the case.

If the user has Word and Winamp open (Winamp is a MP3 music player). Winamp needs the CPU every couple of milliseconds in order to play some music while Word needs CPU time to display some text typed by the user. How does the OS deal with this multi-tasking? We shall only look at two processes competing, but in reality it could be between twenty to a hundred processes running at any one time.

The OS has a special module known as the scheduling module. This module has the task of performing this scheduling. Its aim is to make sure that resources such as CPU time, printer and I/O is shared efficiently.

Scheduling states
Scheduling algorithims
Scheduling levels
Priorities and scheduling
Proccess control block