home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!sun-barr!ames!data.nas.nasa.gov!taligent!apple!starnet!jpp
- From: jpp@StarConn.com (John Pettitt)
- Newsgroups: comp.unix.sysv386
- Subject: Re: Loosing incoming serial characters [summary]
- Message-ID: <1992Sep9.060117.14953@StarConn.com>
- Date: 9 Sep 92 06:01:17 GMT
- References: <JOCHEN.92Sep5145619@busybit.mrz.sub.org> <Bu5qJq.HJo@gator.rn.com> <CFT637P@geminix.in-berlin.de>
- Organization: Starnet-Public Access UNIX--Los Altos, CA 415-949-3133
- Lines: 39
-
- [ stuff about bus master etc deleted ]
-
- First to answer somebody elses question the standard for the PC bus is
- IEEE P996.
-
- Now on to the main event - serial I/O (or lack of). The basic problem
- is that serial I/O is essentially a real time asyncronous event. I.E.
- you can't control it. This is fine if you have a real time OS to handle
- it but if you run an timesharing OS (like say UNIX) it becomes a
- problem. The only real solution is to add more buffering (this is the
- benifit of the 16550). However if you delay log enough the buffer will
- fill up. If you are using the same CPU to do flow control as to empty
- the buffer then flow control won't help if your CPU is busy doing some
- other task (like SCSI interrupt handler).
-
- One of the proposed solutions, moving to a memory mapped disk, may not
- help too much. Firstly the IRQ overhead is probably the same and
- secondly it will introduce a copy from shared memory to kernel buffers
- which will impact performance.
-
- So what to do:
-
- Ensure that the serial driver spl (the level of it's interrupt handler)
- is better than that of the disk driver. This may be non trivial since
- the spltty() value used for all the line diciplin code is a kernel
- source value. However it is possible to ensure that you interrupt that
- the correct (splhigh or spl7 value) and by double buffering and calling
- the line diciplin from a poller ensure that it's run at the correct
- spltty and also not called for every byte of input.
-
- Hope this helps
-
- Regards
- John Pettitt (Device Driver Hacker - Retired)
- --
- John Pettitt jpp@starconn.com
- Archer N81034 apple!starnet!jpp
- Me, say that, never: It's a forged posting! Fax: +1 415 967 8682
- Voice: +1 415 967 UNIX
-