Subject: Re: O_ASYNC on ttys
To: None <firstname.lastname@example.org>
From: Bill Studenmund <email@example.com>
Date: 07/09/2001 11:45:35
On Sat, 7 Jul 2001 firstname.lastname@example.org wrote:
> > then started dumping characters at it. Of course, they came back at
> > 240Hz, just as I wanted.
> > I'm surprized that works. Are you sure you're getting 240Hz wakeups?
> why? 2400/10=240. i don't know how netbsd handles serial port on sparc,
> but with low speed i think serial port sends one interrupt per character.
> so why it shouldn't work?
Because there's a difference between 240 interrupts per second and 240
wakeups per second. The difference is the scheduler.
The scheduler typically gives the processor to a process for one tick. If
one tick is 10 ms (100 Hz), and there's a process running when the
interrupt comes it, there's a good chance the process running will get to
finish its tick. Thus there will be a big delay in getting the wakeup down
to the process that wants it. Also, multiple interrupts could pile up
before one is delivered.