Hi, I'll add my 10 cents in addition to what others have already said... > Who schedule the schedular? I mean , let linux uses round-robin > scheduling policy, with some time slice say 'x'. So process can run > upto x time slice and if not finished it is preemted and schedular > schedule another process to run. So my question is that, how kernel > comes to know that time slice expire and now preempt the current > process? (I think kernel might be decrementing time slice,but when > this happen,because in uniprocessor system , CPU is currently > assigned to running process.) The scheduler is not a separate independent process, rather it is run on the behalf of the currently running the process. The timeslice of the process is in multiples of timer tick (If timer ticks every milisec, then the time slice is in x no of milisecs). So while a process is executing, all the interrupts (including the timer) that happen during that time, actually eat up the timeslice of that process. So a significantly interrupt loaded system may leave a very small pie of the timeslice to the process, although the kernel will see the process consuming its entire timeslice. Secondly, the timer interrupt service routine checks at every tick if a reschedule is needed ... HTH, Thanks, Rajat -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ