Mail Archives: djgpp/2000/01/05/06:44:52
On Tue, 4 Jan 2000, Andris Pavenis wrote:
> > Second, amazingly enough, a DOS box in the background doesn't get
> > timer interrupts delivered to it.
>
> My experience shows that it gets part of timer interrupts in background
> (my rough estimate is 20% or less depending on system load).
At the time, I tested this with a simple DJGPP program that uses
setitimer, installs a handler for SIGALRM, and increments a counter
each time the handler is called. In the background, the counter
doesn't get incremented at all during a run of at least 10 seconds,
but as soon as I switch the focus to the DOS box, the counter begins
to change.
Of course, it's possible that 10 seconds aren't long enough, but if
the ratio was indeed 20%, I'd expect to get at least some of them.
Perhaps Windows treats protected-mode programs differently than
real-mode programs?
If anybody is interested, I can dig out that test program.
- Raw text -