[comp.unix.questions] Read and Flow Control

ggvvgg@mixcom.COM (Dave Fenske) (03/28/91)

Assume one opens a tty port and does a low-level read on that port, reading
just one character at a time.

The question is: Does the operating system assert flow control (either X-on
or RTS/CTS)?

The problem I'm running into is that there appears to be a problem when the
computer gets very busy and cannot keep up with incoming data (9600 baud).

BTW, this is via a Computone AT-8 on an AT clone under Xenix 2.3.2.

I've already increased the receive buffers on the computone, quadrupled
NCLIST, and up-ed (nice) the priority of the process that's doing the
reading.

Any ideas?

Dave Fenske   (...uunet!mixcom.com!ggvvgg)

martin@adpplz.UUCP (Martin Golding) (03/30/91)

In <433@mixcom.COM> ggvvgg@mixcom.COM (Dave Fenske) writes:
>Assume one opens a tty port and does a low-level read on that port, reading
>just one character at a time.
>The question is: Does the operating system assert flow control (either X-on
>or RTS/CTS)?

I shall be very careful, as I was repeatedly stomped to very flat pancakes
in a previous post. For those of you who remember me, I HAVE man stty IN
THE WINDOW RIGHT UP THERE ^. 

If you are on unix (very, very careful) and the device sending to the port
is capable of xon/xoff flow control, then you need to set the port
in question "-ixoff". "-ixon" is for outgoing (host recognizes terminal
flow control), "-ixoff" is for incoming (host produces flow control). 

>The problem I'm running into is that there appears to be a problem when the
>computer gets very busy and cannot keep up with incoming data (9600 baud).

>BTW, this is via a Computone AT-8 on an AT clone under Xenix 2.3.2.

Uh oh, I I don't have manuals for those, now I'm in trouble. I do have
to admit that all 375 of the corrections I got to my last post were 
very polite.

>I've already increased the receive buffers on the computone, quadrupled
>NCLIST, and up-ed (nice) the priority of the process that's doing the
>reading.
Unix priorities seem to work like the stoplights in New York. They're
seen, but not observed...

Are there other processes running that you can kill? can you improve the
performance of the process that is reading? If you're writing stuff to a
file, can you pass it to another process for the write? (via shared memory, eg)
Are you up to fiddling with the driver?

>Any ideas?

Yeah, get a Pick OS for that puppy. We can run 32 ports in 512K, and our 
task switch time is about 50 microseconds. 

>Dave Fenske   (...uunet!mixcom.com!ggvvgg)


Martin Golding                         | sync, sync, sync, sank ... sunk:
Dod #0236                              |  He who steals my code steals trash.
A Poor old decrepit Pick(tm) programmer ... Sympathize at:
{mcspdx,pdxgate}!adpplz!martin or martin@adpplz.uucp