On line 8074 in “klxint”, a test is made whether to restart any processes waiting to send output to the terminal. The test is successful if the number of characters is zero or if it is equal to “TTLOWAT”.
If the number of characters is between these values, no “wakeup” is performed until the queue is completely empty, with the strong likelihood that there will then be a hiatus in the flow of output to the terminal. Since temporary interruptions to the flow of output are quite frequently observed in practice and represent a source of occasional irritation if nothing more, one may reasonably enquire “is there any way the character count can get from being greater than “TTLOWAT” to below it, without this being detected at line 8074?”
Quite clearly there is, since each call on “ttstart” can decrement the queue size, and only one such call is followed by the test. Thus if the call on “ttstart” from one of “ttrstrt” (8492) or “ttwrite” (8568) happens to cross the boundary, a delay will result. The probability that this will happen is small, but finite and hence the event is likely to be observed in any reasonably long output sequence.
There are two other situations in which “ttstart” is called which seem to be satisfactory. At “ttwrite” (8561) the queue is at its maximum extent; and at “ttyinput” (8363) there is a preceding call on “ttyoutput” which usually (but not invariably!) will have added a character to the output queue.