CPU Scheduling is the process by which an Operating System decides which programs get to use the CPU. The major current O/S all work pretty much alike, although there are many possible ways to decide this issue. First, one must understand that, although every computer task takes CPU time, some take lots and some take just a bit, and then use I/O devices, or wait for user input. When that happens, processes running on the computer usually release the CPU, and let other processes use it.
In most systems, each process has a priority number, although numbers mean different things in different systems. In Unix, for example, priority 0 is the highest, and the bigger the priority number, the lower the priority. When a process is started, it is given a number, and then waits until all higher priority processes are not using the CPU before it gets a shot. Usually, the CPU is given to a process, and then, after a "time slice" has gone by, the scheduler re-evaluates the processes to see which one "deserves" the CPU next. Sometimes, the priority of a process is lowered when it uses CPU, so that a "greedy" process won 't make the system too slow for other processes. It 's all a balancing act, and the better it is done, the faster the computer appears to be to the user or users.
INTRODUCTION OF ROUND ROBIN
It is one of the oldest, simplest, fairest and most widely used scheduling algorithms, designed especially for time-sharing systems. A small unit of time, called time slice or quantum, is defined. All runnable processes are kept in a circular queue. The CPU scheduler goes around this queue, allocating the CPU to each process for a time interval of one quantum. New processes are added to the tail of the queue.
The CPU scheduler picks the first process from the queue, sets a timer to interrupt after one quantum, and dispatches the process.
If the process is still running at the end of the quantum, the CPU is preempted and the process is added to the tail
References: 1. Advantages and disadvantages of round robin scheduling http://wiki.answers.com/Q/Advantages_and_disadvantages_of_round_robin_scheduling_if_the_time_slice_is_too_large 2. Example of round robin scheduling http://wiki.answers.com/Q/Example_of_round_robin_scheduling 3. Operating system http://operatingsystem-hw1.googlecode.com/svn-history/r8/OS/csc501-lab0/otherCodes/Lab1Answers.txt 4. Round robin scheduling http://en.wikipedia.org/wiki/Round-robin_scheduling http://www.scribd.com/doc/10063347/What-is-Round-Robin-Scheduling