Re: udelay() and BogoMips doubts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




>>- If we go into infinte loop in kernel mode, will the scheduler be called by timer interrupt once the time allocated to current runing process expires ? Does the >> timer interrupt take care of it or will our system be hanged. If timer interrupt takes care of it, how does it do that ?


Yes, the timer will interrupt the loop [unless ofcourse you disable all interrupts prior to looping], but it will *NOT* take care of loop, once the timer interrupt service finishes, it returns to the loop since the loop is running in kernel mode and kernel is non-preemptible (except for interrupts) and the system will appear as if it is hanged. [No other processing will occur apart from interrupt servicing]. This is true till kernel 2.4. Dunno about 2.6 which has a preemptible kernel.

Correct me if i am wrong.

For BogoMips visit
http://www.tldp.org/HOWTO/BogoMips.html

Ketan


At 10:36 PM 8/10/2004, Gaurav Dhiman wrote:

Hi,

Can someone let me know the answers to my following doubts:



- I am reading the 6th chapter of Rubini's book (LDD), want to know about the internals of udelay() function. How this function exactly works, I saw its code at following link:
<http://lxr.linux.no/source/include/asm-i386/delay.h?v=2.4.21#L18>http://lxr.linux.no/source/include/asm-i386/delay.h?v=2.4.21#L18
but cud not understand it as I am not able to find the definations of __bad_ndelay and all other realted functions. The deceleration has been given just before the defination of udelay() function, dont know where the definition is.
Also let me know about BogoMips and how 'loop_per_second' is used in udelay() macro.


You can give me the links to some good articles on this, I can read it from there.

Regards,
Gaurav.



Do you Yahoo!?
<http://us.rd.yahoo.com/mail_us/taglines/100/*http://promotions.yahoo.com/new_mail/static/efficiency.html>New and Improved Yahoo! Mail - 100MB free storage!



-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux