tty driver advice

guy at gorodish.UUCP guy at gorodish.UUCP
Sun Mar 1 14:52:01 AEST 1987


>>This could be done just fine on the user side of the input queue.
>
>Only if you are willing to give up one of two things:  Proper
>backspacing, or immediate echo.

A streams-based driver could do the canonicalization in a service
procedure; they are not run at interrupt priority level.  However,
you may have to run some of the code at interrupt priority level
anyway, to prevent an interrupt routine from asynchronously smashing
data structures used by the canonicalization code (this being a price
you pay for extensively using "spl" routines to do mutual exclusion,
as UNIX does).

However, Chris's point that doing it at read time requires you to
give up one of those two things still stands; I am unwilling to give
up either one (and I suspect a lot of other people are also unwilling
to give them up).

If somebody shows me some evidence that so much work is done at
interrupt priority in such a scheme that it causes significant
problems, I might consider it (although I'd be more likely to
consider implementations that permitted more sophisticated methods of
mutual exclusion).

However, I tend to suspect that it does *not* cause a problem,
because at one point Jack Slingwine at CCI profiled how much time was
spent at interrupt priority in various routines in 4.2BSD (the
results should be applicable to most other UNIX implementations) and
the *disk* driver won by far.  (How fast *can* you type, after all?)



More information about the Comp.unix.questions mailing list