[inforoots] Interrupts (was 3 Key PC Reset...)

Michael Albaugh m.e.albaugh at gmail.com
Sun Apr 27 19:22:26 PDT 2008


On Sun, Apr 27, 2008 at 6:58 PM, Evan Koblentz <evan at snarc.net> wrote:

> Here's an article I published on Feb. 2, 2004.  Keep in mind that the my target audience
> was  computer collectors and hobbyists:

> (Quoting David Bradley)

> Had they known it'd last 20 years, some things would have been done differently.
>  For example, "The interrupts on what's now called the ISA bus are positive-edge
> triggered and we should have made them negative.  The consequence of that
> decision is it was impossible to share interrupts," he said.

Actually, that was a self-fulfilling prophecy. Some of the late ISA
cards could be made
to _pulse_ the IRQ line low, for something like a microsecond. The IRQ
would happen
at the "end" of the pulse, or a little later if two cards happened to
request at the same
time. The software would do "the usual" chain of "is this yours?", and
it would work
only a little worse than a "real" negative level-sensitive IRQ. Or, it
would have if there
hadn't by then been a decade of software written with the assumption that it was
"impossible to share interrupts", and thus avoiding all the stuff that
typical (non-IBM-PC)
systems had done for years. Stuff which, incidentally, made
multtasking or at least
async I/O easier. Sigh.

BTW: another "odd fact" about IBM-PC interrupts (ths one Intel's fault) is that
on the AT and descendants, the interrupts are "chained" from a "slave" interrupt
controller to a "master". A person who just looks at the function
being performed
and the fact that they are edge-triggered will acknowledge "outward
from the CPU",
that is, first the master, then the slave. But the (Intel-written)
documentation on the
chips suggested the opposite order, many folks coded "by the book".
Since drivers
usually had timeouts/retries, things "more or less worked", albeit a
little slower
than they should. I don't recall who, but one of the (IIRC) OpenBSD developers
instrumented their disk driver and found that the recommended order lost a
few hundred disk-operation-complete interrupts a day. Switching to the sane
order clean it up entirely.

Funny things, de-facto standards.

  Mike


More information about the inforoots mailing list