On Thursday 12 August 2004 14:35, Gaurav Dhiman wrote: > Hi All, > > Thanks for your replies, but nobody answered about "BogoMips" and > "loop_per_second". If somebody knows the details of BogoMips, please > let me know how it works and what is the role of it in udelay() > function. When you call udelay(1), the system will spin in a tigh loop for 1us. But how many itterations of the loop is that? That is what the BogoMips caculation does. the BogoMips value is used to determine how many loop itterations are needed. > One more thing, as Prasanna said that while returning back from > interrupt, check is doing if we are returning to kernel space or user > space and then scheduler is called only if we are returning to user > space and the time slot of current process has been expired. Please > let me know, in case we are returning to kernel mode, why the > scheduler is not called if the time slot of current process has > expired, why such a decision is only taken if we are returning to > user process. If the scheduler is called in this case also (when > returning to kernel space), then situation like while() loop in > kernel mode will not make the system hang. It will definitely bring > the performance down, but will not give an impression of hanged > system. Why scheduler is not called while retuning to kernel mode. You basically described the difference between a non-preemptive and prememtive kernel. In a preemptive kernel, assuming no spinlocks are held, you can do what you are suggesting. -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/