From: atlas_wang AT yahoo DOT com (Wang Yong) Newsgroups: comp.os.msdos.djgpp Subject: Hardware Interrupt Latency in Protected Mode? Date: 8 Jul 2003 09:21:45 -0700 Organization: http://groups.google.com/ Lines: 34 Message-ID: <78a4a70a.0307080821.bdb7edb@posting.google.com> NNTP-Posting-Host: 202.156.2.218 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1057681306 10559 127.0.0.1 (8 Jul 2003 16:21:46 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: 8 Jul 2003 16:21:46 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Dear all, I am trying to find out the hardware interrupt latency in protected mode. The test is as followings: 1. test program (1) works as a clock generator to make 4Khz square wave, CPU is P4 Celeron 1.7GHz; 2. test program (2) runs on another computer (PIII 933MHz). It sets ISR for IRQ7 in protected mode(_go32_dpmi_set_protected_mode_interrupt_vector(), no interrupt chain). The square wave from test program (1) connects to its IRQ7, ISR sets parallel port to 1 when entering, and reset to 0 when leaving. Both programs are compiled by DJGPP v2.03, gcc 3.23. DPMI host is CWSDPMI v5. I use CWSPARAM to disable virtual memory, so no paging will occur. And in program (2), ALL hareware interrupt are disabled expect IRQ7, main() is an infinite loop: for (;;) {}. Therefore, technically, no mode switching will occur in program (2) during test. I use logical analyzer to capture the interrupt latency (time between the low-to-high edge of interrupt source signal from program (1) to low-to-high edge of signal from program (2)). Normally, the latency is less than 6 microseconds, which is really reasonable. However, sometimes (in 1 or 2 hours), a very large latency, 30 to 60 microseconds, can be observed. I am not sure if anybody did the same test in DJGPP. Any similiar or better data? Or anybody find the same sudden large latency? And what steps should be strictly foloowed to restrain the latency in an acceptable range, such as < 10 microseconds? Thanks for your patience and I am looking for your reply. Sincerely, Wang Yong