Last time, we spoke about the Linux process scheduler and how it runs in the shadows swapping processes in and out of a running state so everyone gets a stab at the CPU. Today we’ll go over how the kernel keeps track of time and just what it means to do something in a jiffy.
Just to recap, last time we saw that every process has a priority assigned to. The scheduler will bump this priority up and down as time goes on and depending on how responsive the process is.
If the task stops often because it is waiting for input or output (I/O) – such as user input on a keyboard, or for a disk drive to send data – it will have its priority increased over time. This is because the kernel considers the application to be behaving nicely; each time it stops while waiting for I/O it voluntarily yields control back to the scheduler allowing another process to run for a while.
http://www.linuxlinks.com/portal/news/article.php?story=20080221131442844