Son of FAS?

Greg Andrews gandrews at netcom.COM
Fri Apr 26 11:35:50 AEST 1991


In article <1991Apr25.010758.1522 at pegasus.com> richard at pegasus.com (Richard Foulk) writes:
>I recall hearing that Equinox (or someone like that) equips their
>smart serial card with a driver that doesn't use interrupts.  They
>do some kind of polling from within one of the kernels inner loops.
>
>Doing away with the interrupt overhead supposedly results in a marked
>performance gain.  (Seems reasonable.)
>

Actually, they don't poll with the system processor.  The ports themselves
probably handled by a dedicated processor on the board itself.  Since that
processor has (almost) nothing else to do, it can efficiently poll the
port circuit.  Since the system processor doesn't have to deal with the
low level byte-in/byte-out of the serial ports, it can efficiently do
everything else.

>
>My question is: couldn't this same technique be used to good advantage
>with the fifo-ized dumb serial cards?
>
>Since most smart cards gain mostly from the reduced interrupt load they
>place on the system wouldn't this blur the difference a bit more?
>

No that wouldn't work out very well.  Here's the best example I can think
of:

Polling works like the mailbox at your home.  Once a day, you go out and
check it to see if you've received mail.  Since you only have to poll it
once a day, it doesn't burn up too much of your time.  The mail comes at
regular intervals, so you know when to expect it and you don't have to
continually check the mailbox all day long.

Interrupts are like your telephone.  You have no idea when someone will
call, so you need a signal to get your attention.  When the bell rings,
you put down what you are doing and grab the phone.  If the phone had no
bell, you would have to constantly drop what you are doing and go check
if someone were calling.  Otherwise you might miss a call.  If you had
nothing else to do all day, this wouldn't be a problem.  However, if you
need to get other work done around the house, polling the phone would be
too wasteful of your time.

Asking the system processor to poll the serial ports would be a big waste
of its time.  It would have to check the port so often that everything
else would slow down to a crawl.  The processor is too busy checking if
another byte was received to get anything else done.  Even when nothing
is coming in.

Polling the hardware can be very efficient, since you don't have to waste
time putting the current task aside just to grab a byte out of the port.
But it's best performed by a processor dedicated to just that task.
If the processor must do other things, then asking it to poll the serial
ports will slow it down drastically.  Better to use interrupts so it won't
be bothered until there's real work to be done with the port.

Hope this helps...

-- 
.------------------------------------------------------------------------.
|  Greg Andrews   |       UUCP: {apple,amdahl,claris}!netcom!gandrews    |
|                 |   Internet: gandrews at netcom.COM                      |
`------------------------------------------------------------------------'



More information about the Comp.unix.sysv386 mailing list